Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help thank you. Description The objective of this programming lab is to test the performance of six different sorting algorithms (five of them discussed
need help thank you.
Description The objective of this programming lab is to test the performance of six different sorting algorithms (five of them discussed in class) by sorting a big file of data. The purpose is to count the total time that each algorithm took to sort a dictionary. Write a class called Sorting.java, where will process a file containing a dictionary. The file: dictionary.txt That is located at the website, contains 641,392 words in English and Spanish. In the file Sorting.java you will process the time elapsed that each algorithm 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 1 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 1 See video: 15 Sorting Algorithms in 6 Minutes and select one of your preference Implementation and Test Cases The SortAlgorithms.java class Create 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 arrayStep 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