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

  What is meant by the name dynamic array

So how would you dimension this array if you don't know how many elements you will need? Sure, you could dimension the array to be very large arrStudents[1000], but that would be a big waste, especially if you ended up only needing 5 elements, so ..

  Prepare a java simulation program

Given a hash function h, prepare a java simulation program to determine each of the subsequent quantities after 0.8*tablesize random keys have been generated. The keys should be random integers.

  Distance traveled modification

Distance Traveled Modification

  What would be an incorrect way of writing this equation

Jim develops 5 Java applications a year. Joe develops 10 Java applications a year. Jim gets paid $5000.00 per application, but Joe gets paid $10000.00 per application.

  Write a method called printlevel

Write a method called printLevel that takes an integer n as a parameter and that prints the values at level n from left to right. The values should be printed one per line.

  Java programming arrays

Write a Java application program that takes in user input from keyboard and calculate semester grade based on the scores. In this assignment, you are going to rewrite the program, instead of taking keyboard input, you will use dialog box to prompt..

  Create an interface called player

Create an interface called Player. The interface has an abstract method called play() that shows a message describing the meaning of "play" to the class.

  Develop a thorough testing example with different values

If the rate of y is less than z, then the queue may never get full. The program will simulate process synchronization. You will want to make sure that you output a message during each of these transactions

  Declares three arraylist objects referenced by the objects

Write a program called ThreeArrayLists.java that declares three ArrayList objects referenced by the objects named priceList, quantityList, and amountList

  Rna hairpins and mirror box drawings

When the program starts up, it should draw a vertical line from the top of the screen to the bot- tom that cleanly divides the window in half. This makes it easier for the user to see the mirror effect.

  Create a program that develops an amortization schedule

Your project as a programming consultant is to create a program that develops an amortization schedule. Your program should be written as a Java applet.

  How to read data in a link list

How to read data in a link list?

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