This book is now obsolete Please use CSAwesome instead.
16.4. StringCoder - Part B¶
Part b. Write the StringCoder method
encodeString. A string is encoded by determining the substrings
in the master string that can be combined to generate the given string. The encoding starts with a string part
that matches the beginning of the word, followed by a string part that matches the beginning of the rest of
the word, and so on. The string parts are returned in an array list in the order in which they appear in word.
The helper method
findPart must be used to choose matching string parts in the master string.
16.4.1. Try and Solve It¶
The code below has a main method for testing your method.