Lab 9, CSC 102, Spring 2012
Develop the insert method on the StringList hierarchy, that inserts a string into a sorted StringList to produce a new sorted StringList. In this case, we’ll be sorting them in increasing order, using the string’s compareTo method. Read the API documentation to see what values compareTo returns.
As we did in class, build on the insert method to construct an insertionSort method.
Next, develop a "select" method on a StringList, that returns a new list containing the same elements but where the smallest element (determined using compareTo) is the first in the list.
Use the select method to develop a selectionSort method.