This assignment makes use of the files contained in this zip file.
This assignment is due Monday, September 6.
This assignment is based on the examples from the first day of class. It is meant to be a review of basic tree algorithms, recursion, and elementary parsing.
In the zip file there is a file BuildTree.java which outlines a parser that builds arbitrary trees (not just binary trees, as in the examples from class). You need to complete this parser.
Also in the zip file there is a file PrettyPrinter.java which is supposed to format the trees created by BuildTree.java . You need to complete this pretty printer.
The file Tree.java defines the Tree data type for you. Your implementations of BuildTree.java and PrettyPrinter.java should use this data type.
When you have finished implementing BuildTree.java and PrettyPrint.java , then the file Tests.java should compile and run. The output from running this program should look exactly like the file output.txt .
Turn in a zip file containing your versions of BuildTree.java and PrettyPrinter.java along with the other files from hw1.zip.
This assignment is due Monday, September 6.
|