import java.util.*; // Use an instance of this for all subwords of a certain length. // Thus, one instance of this for subwords of length 3, one instance // for subwords of length 4 etc. class WordInfo { String originalWord; // Store the full word here. You must do this. int subWordLength; // What is the length of each subword here. Again, you need to set this correctly. LinkedList subWords; // The list of subwords of that length. // This will print out all the subwords into a string. public String toString () { String s = "Subwords of string \"" + originalWord + "\" of length " + subWordLength + ": \n"; if ( (subWords == null) || (subWords.size() == 0) ) { s += " NONE"; return s; } for (int i=0; i