Create a search function that can search for an integer

Assignment Help JAVA Programming
Reference no: EM131005551

Question: Algorithm Concepts

Project 1 - Sorting Algorithm

Work in teams of up to 3 to create a set of algorithms in Java (or Python, or C++, or php). The algorithms you implement are the following:

- two sorting algorithms
- one search algorithm

The sorting algorithms receive an array of input integers and sort them. The input array may be read from a file or directly from the user/ keyboard (your choice). The number of integers in the array may be up to 100,000.

The search function receives a number and confirms whether the number is in the array or not.

Requirements:

. Create two different sort functions (insertionSort, merge sort,quickSort...) which take an array and the array length. The algorithms you choose must be efficient.

. They should sort the array into ascending order.

. They should print the elements of the array (using a loop and the ? System.out.print(x) function).

. Create a "masterSort" function that will call the appropriate sort function depending on the length of the array. ?

. Create a "search" function that can search for an integer in the array.?

. Take input from the user - "Enter a number to search for in the array". ?

. If the number is in the array print "Yes, the number you entered is in the array" otherwise print "No, the number you entered is not in the array".

Documentation:

There should be a comment above each line of algorithm code explaining what is happening at each step

At the top of the file, as a comment, you must include:

- The name and student numbers of members of the group

- Information about how exactly to run and use the program.

Verified Expert

The given solution is prepared Using Java IDE (Net-Beans) and Notepad, It is a Java program for sorting and searching algorithms. Screen shots for running application are attached with it. This solution is specifically based on questions asked by client on the mentioned topic. This is a verified solution and it is answering all the questions which were asked by the client in requirements.

Reference no: EM131005551

Questions Cloud

Describe the concept of social mobility : List and describe the components of Social Stratification. Compare and Contrast the class and caste systems?
Explain the steps in the consumer decision-making process : Explain habitual decision making, limited problem solv- ing, and extended problem solving. What is the role of perceived risk in the decision process? Explain the steps in the consumer decision-making process
During an economic recession : During an economic recession, discuss how management's or a union's bargaining power might be affected. Give an appropriate business example to illustrate what you mean
Calculate the ratio of the depletion region width w : Calculate the ratio of the depletion region width W under a forward bias of 0.3 V to the equilibrium width W0, for a GaAs abrupt p-n junction with a doping level on the p-type side of NA= 2 x 1017 cm·3 and a doping level ..
Create a search function that can search for an integer : Create a "masterSort" function that will call the appropriate sort function depending on the length of the array - create a "search" function that can search for an integer in the array.?
Why star delta starter is preferred with induction motor : Why star delta starter is preferred with induction motor? State the difference between generator and alternator. Why AC systems are preferred over DC systems? How can you relate power engineering with electrical engineering? What are the various kind..
Scientific method to understand : As a relatively young discipline, sociology has most ambitious aims: to use the scientific method to understand, generalize and predict social behavior.
Applying nscs scholarship : Please answer two questions. It is for applying NSCS scholarship. (respond in 300-450 words)
What is the decision facing electrolux : Marketing in action Case - Real Choices at Electrolux - What is the decision facing Electrolux? What factors are important in understanding this decision situation

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a java program to read sequences of integers from a

write a java program to read sequences of integers from a text file build a binary search tree for each sequence by

  The api for this class ispublic void poweronnbsp sets the

the api for this class ispublic void poweronnbsp sets the machine ready to serve the selected ice creampublic void

  Prompts the user to enter 4 numbers for a salesperson

Write a program (SalespersonCommission.java) that prompts the user to enter 4 numbers for a salesperson's items sold for last week and displays that salesperson's earnings.

  Overriding the equals method

Use the equals method, which Player inherits from the Object class, to determine whether two players are the same. Are the results what you expect?

  Produces a simple formatted report

For this lab you will write a Java program that produces a simple formatted report. The program will prompt the user to enter a file name. This file must contain information in a specific format (detailed below)

  Calculate the total hours of over lapping meetings

Suppose you have a meeting room which can hold multiple meetings and the smalled duration of meeting can be 30 mins. Calculate the total hours of over lapping meetings.

  Depicts a model for recording flight and passenger

This assignment requires you to design, implement and test a program using Java features from the first half of the subject content. You are required to implement in Java all the classes presented in the conceptual model according the specificatio..

  What makes a program easy to modify

Describe the order of magnitude of the code section using Big(O) notation and Explain the relationship between dynamic storage allocation and recursion.

  Project about the time-series data trend prediction

The coding part of the project and concerns with the implementation of a time-series prediction method that you either take from the literature or you have developed by yourself

  Change code in java program so that input of floating point

Change code in Java program so that input of floating point values is possible.

  Java application that calculates weekly pay for an employee

I have attach the pseudocode for it. I have also attach the program that I wrote for it and it will not compile need help on it. Now does the progrma follow suit with the pseudocode or not? In not then how do I go about on doing it?

  Writing a program that parses

The programming project involves writing a program that parses, using recursive descent, a GUI definition language defined in an input file and generates the GUI that it defines.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd