public class WordCount { // remember: can compare words alphabetically using str1.compareTo(str2), which returns -1, 0, or 1 public class LineReader { // returns whether there's another line public boolean hasNextLine() { ... } // return the words in the next line public String[] nextLineWords() { ... } } public class Record { // a record with no occurrences public Record(String word) { ... } // get the word corresponding to this record public String getWord() { ... } // add another occurrence on the given line public void increment(int lineNum) { ... } // e.g., "peter.............4: 1 2 3" public String toString() { ... } } public class TreeNode { // TODO: TreeNode fields // TODO: TreeNode constructor // insert a word on the given line into the tree public void insert(String word, int lineNum) { // TODO } // build and return the final output of alphabetized records public String getFrequencyList() { // TODO } } // construct the tree, return the alphabetized list public static String buildFrequencyList(LineReader reader) { // TODO } }