CS 50200 - Programming Assignment 1

This assignment makes use of the files contained in this zip file. This assignment is due Tuesday, January 22.

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 as strings 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 called CS502Hw1Surname.zip (where Surname is your last name) containing your versions of BuildTree.java and PrettyPrinter.java along with the other files from hw1.zip.

This assignment is due Tuesday, January 22.


Return to the main homework page.
Return to the CS 50200 home page.


compliments and criticisms