Question: JAVA. - Add to this program by: Adding a class named Utility with a static Quick sort method that returns a sorted array, print result

JAVA. -Add to this program by: Adding a class named Utility with a static Quick sort method that returns a sorted array, print result in asscending and descending order, call quick sort from the Main-

Build a database with numbers that can be sorted and searched with your program.This will have two classes; a main class and data class.

The user will input five random numbers in the main class to be stored in a array. You must insert an instance of the data object within the main class to store the numbers array in a field of the database using its constructor.

Data Class configs:

Within the data class, use a static Quick Sort method that returns the data in ascending and descending. Call the method from the main and print the result.

Within the data class, use methods that will return min, max, and average. Call them from the main class and print.

Lastly in the data class, use a method that will search for a value via binary search and returns the index of the value. Call the method from the main class and print.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!