Sorting lab

Topics: File I/O, Arrays, Sorting Algorithms

  Download the following .cpp file, along with the whale.txt text file:

                sortlingLab.cpp

                whale.txt

For part 1, implement “locateSmallest”, “printItems”, “reverseOrder”, “shuffle”, and finally “sort”. 

For part 2, read in each word from whale.txt (it’s Moby Dick) and output the words from this story to a file “sortedWhale.txt” in sorted order.  The file contains exactly 211348 words.  Give your program a good 3 minutes or so to finish this grueling task.  Discuss with the TA the big-Oh run time of your sorting algorithm (the number of steps in terms of the number of items n being sorted).