CMPSCI 187: Programming With Data Structures

David Mix Barrington

Fall, 2011

Solution to Programming Project #7

Here are our versions for the files that were to be submitted for Project #7. You could use this code (with attribution) in future projects if there were any, and you are responsible for reading it.

As of 23 November, I am posting the classes PTNode and PrefixTree for you to use in the first part of the project. That asks you to build a prefix tree out of the Knuth's list of five-letter words.

On 27 November I am adding a stub of your main class, which defines the phoneword tester object. You need to write a constructor (that builds a prefix tree out of Knuth's word list) and the list method, that makes an array out of the phonewords that can be made from its input string.

On 6 December I am posting StubDriver.java, which tests the prefix tree formation and a couple of list operations. There is code commented out there that will allow you to test your addString method without having to do any file I/O.

Last modified 10 December 2011