Greg, you wouldn't
manipulate the
string recursively so much as you would break it up and
test it recursively. You can use the String.substring() method to break the string down. You will also need the String.indexOf() method to disect the
word into different parts.
Here's a hint:
test for UWF word:
- extract parts for testing a UWF word.
- do parts pass test?
test for Florida word:
- extract parts for testing a Florida word.
- do parts pass test?
Recursion comes into play because UWF and Florida words are tested in terms of either themselves or each other. Translating the tests for each into Java shouldn't be that difficult based on the definitions given.
Edit: here's the
JUnit test I used to solve it (my solution was ~ 100 lines of code, including comments):
[ November 28, 2005: Message edited by: Junilu Lacar ]