/** * Keeps track of each sentence that has been sent and * can return the 10 sentences that have been used most often. */ public interface TopTen { /** * Records that the sentence has been sent. * @param sentence the sentence sent, ignored if null */ public void recordSentenceSent(String sentence); /** * @returns an array of length 10 with the sentences * ordered from most frequent to least frequent * If fewer than 10 phrases have been used, the empty * spaces in the array are null * If two sentences have the same frequency, then the one * that was used more recently is listed first. */ public String[] getTopTen(); }