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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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