Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago