Question: The objective of this program is to test the performance of six different sorting algorithms (five of them) by sorting a big file of data.

The objective of this program is to test the performance of six different sorting algorithms (five of them) by sorting a big file of data. The purpose is to count the total time that each algorithm took to sort a dic- tionary. Write a class called Sorting.java, where will process a file containing a dictionary. the 5 alogiritmhs we learned was: bubble, selection, insertion, merge, quick, and heap sort. The file: dictionary.txt contains: priceably southwesterly semipapal genuine cardiotoxicities shoeman Utahan ungeodetically In the file Sorting.java you will process the time elapsed that each algo- rithm took to sort in increasing order the file dictionary.txt. Use the following sorting methods:  bubble,  selection,  insertion,  merge,  quick, and  a one algorithm selected of your preference Test Cases Sort the file with the six different algorithms and check the performance. You can use the System.nanoTime() to calculate the execution time for each algorithm. In similar fashion, test also in nanoseconds sequential search and binary search for the following cases: 1. yellow-earth 2. AMARyYO 3. amarillo 4. yellow Implementation and Test Cases The SortAlgorithms.java class make a file called Sorting.java, where will contain the six algorithms. Notice that the Tester program will call these static methods. Each method will only take one parameter, i.e., an array of words. The implementation of the first five algorithms are in your book. Feel free to use them. The merge sort and the one of your preference are not in your book, however, you can use well known resources such as books in computer programming or the Wikipedia to reference your work. Whatever resource you wish to use, make sure you cite your references properly. The Tester.java class Implement a class named Tester.java that will test the performance of the six algorithms implemented in Sorting.java. In this class, you will  read the file dictionary.txt  process each line containing a word  store each word in an array of Strings  sort the array of Strings with the 6 different algorithms and check the performance. Be aware that the array used by the first algorithm will be sorted after the method invocation. Therefore, it is recommended that you clone the array six times, and test each sorting algorithm with a different copy of the array.

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!