Question
This program is in Java The sort method for this program is quick sort You are to write an algorithm for the assigned sort method.
This program is in Java
The sort method for this program is quick sort
You are to write an algorithm for the assigned sort method. Then you are to write a program that reads a file and loads the file into an array. You will then sort the array using the method you were assigned. Once it is sorted, your program should ask the user to enter a value to search for and it should display a message indicating whether the item is stored in the array.
1. Create a text file to be read in
2. Storage class
instance variables: an array, integer variable that stores the size
readFile method- reads the file and then loads the file into the array
sort method- sorts the array using the assigned method
search method- receives a value to be evaluated and searches the array for that value. It returns true or false, indicating whether the value was found
3. Driver class- This class will do the following:
Asks the user for the name of the input file and then passes the file to the readFile method in the Storage Class
Call the sort method to sort the array
Asks the user for a search value and then calls the search method, outputting the result
You may write your program on any topic that you choose.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started