Question: Here is a small sample of the input file: 1) In a single Java program (but not a single class!) write the Bubble Sort routine,

Here is a small sample of the input file:

1) In a single Java program (but not a single class!) write the Bubble Sort routine, determine the time (CPU and Wall clock) it takes to sort an input file of words then do the same for Selection Sort . then do the same for Merge-Sort then using the built-in Java sort routine. (four different sorts in total) 2) The user enters the file name that contains a list of words. Do not hard code the file name in your program. 3) Write to an output file the number of words in the file and the times for the Bubble Sort, Selection Sort, Merge Sort and the Java sort. Do not output the actual list of words. 4) Because you don't know how many words, nor the length of the words, in the file, use ArrayList as the data structure. Other requirements: Remember to format the times in a readable way, displayed as milliseconds Compare the different sort times for strings Implement a Try catch block for the program if the wrong input file is entered by the user
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
