Create an evaluator class that will evaluate the sorting


Create an Evaluator class that will evaluate the sorting algorithms you learned about in this chapter.
Create 1 method for each of the sorting algorithms below. Each method must accept 1 int[]as a parameter. Ensure that the name of your method includes your last name (e.g., John kus might use a method name like this: selectionSortKus).
-Selection sort
-Insertion sort
-Merge sort
Add 3 further methods to the Evaluator class that perform the following tasks:
Returns an array with 100,000 int values in sequential order, starting with 1 and ending with 100,000.
Returns an array with 100,000 random int values.
Returns an array with 100,000 int values in descending sequential order, starting with 100,000 and ending with 1.
In the main method:
Use the Evaluator class to evaluate each sorting algorithm with each of the 3 arrays (best, average, and worst case) for a total of 9 distinct tests.
Store the result of System.nanoTime() before and after each call to the sorting method, and calculate the time in nano-seconds it takes to complete each test (i.e., subtract the time taken before the test from the time taken after the test).
Generate new arrays prior to each test, but do not include the generation of the arrays in the evaluation of sort time.
Output a table showing the best, average, and worst case times for each of the sorting algorithms.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create an evaluator class that will evaluate the sorting
Reference No:- TGS02393422

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)