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

  Describe stringbuffer class in java

Describe StringBuffer class in java. List all the functions relevant to it and explain any five of them.

  Create java program to describe inheritance and polymorphism

Create a Java program based on the geometric shapes example described at the beginning of this lesson using Classes Square, Triangle, Rectangle, and Circ leto help describe inheritance and polymorphism.

  Write a program that prints a payroll statement

Write a program that accepts the subsequent information from the user and prints a payroll statement:

  Define output operators for clock and travelclock

Define output operators for Clock and TravelClock. Modify the classes Clock and TravelClock to declare the output operators as friends.

  Implementing a binary tree write a generic implementation

Implementing a Binary Tree Write a generic implementation of a binary tree class using an internal node class TreeBinUMUC and NodeTreeBin

  Lydia runs a small nail salon in the town of new hope

1. Lydia runs a small nail salon in the town of New Hope. She is debating whether she should extend her hours of operation. Lydia figures that her sales revenue will depend on the number of hours the nail salon is open as shown in the table above. Sh..

  Explain java-oriented microprocessors presented by sun

Research the latest Java-oriented microprocessors presented by Sun. In what ways are they optimized to implement Java programs?

  Implement bounded partial queue by using signaling mechanism

Implement the same using a signaling mechanism that signals to all waiting dequeuers and do a performance comparison using timing analysis. Which works faster?

  Developing prototype applet for web inventory management

As a lead systems developer for iDev3, you have been assigned as a consultant to work with Wrigley Inc (the gum company). Your project consists of developing a prototype applet for web-based inventory management

  What is the purpose of using javascript on a website

What is the purpose of using JavaScript on a website. What is a specific example of a JavaScript application that will be beneficial on the site you are creating. Use an example other than from validation.

  Algorithm design and development - the graduate designs and

algorithm design and development - the graduate designs and develops algorithms for problem solving and implements

  Simple java program that implements some basic file

Your code will prompt the user to enter a file name. If this file does not exist the program will produce an error message and exit. Otherwise the program will open the file and read a line from the file, reverse the line, and then print the line to ..

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