Part II of Final Project
by 10:30 a.m. (before class)
15 Minute In-class presentation on Th April 28.
The second part of the final project asks for the implementation in Java of a
comprehesive set of tree manipulation functions. You will
"present" the project to the whole class on the last day of
the seemster. In addition, you will run the program for me and show me its
various features, as well as be ready to answer any questions I
might have regarding the way it was done.
The program builds on the design you've done individually during last week by reusing (and perhaps enhancing) the
To get a minimum passing grade on the project (C), you should submit at least
an applet with a reasonable Tree class, a wired in example and a Print function.
Building on this, and for increased final project grades, you will
include new features. Please add them incrementally, test them
thoroughly and be ready to submit the highest level version you
have completed, rather than attempting a complete program that
does not work at all. Remember that among the skills I am
testing you on with the final project are your improved software
engineering abilities, including the development and testing of
software, code reuse, documentation and readability for easy
- A Tree abstract data type implemented as a Java class. The implementation (which extends the one you have already done for binary trees)
must be done with a list of children for each node (i.e. not just bounded degree). It must contain methods for:
- Various constructors, including one with a wired-in example.
- Addition and deletion of nodes, including the attached subtrees.
- Navigation in the tree.
- Tree traversal methods.
- A GUI user interface. There should be options for:
- Create a new empty tree
- Load a wired-in tree
- Add and delete a node
- As well as for various navigation and traversal methods, corresponding to the methods you have implemented in the Tree class.
- A mouse interface for choosing the position of the vertex currently being inserted.
Warning: this is not trivial, but you have seen enough examples with mose clicks to be able to do it. The trickiest
part is to recognize which is the vertex on which you have clicked. For this, you must store the clicked point and
search it in the set of nodes.
- At least one creative feature of your choice. A few options are listed below (see additional features).
- Technical requirements:
- You should comment and create the documentation.
- The main html page for your applet should contain links to the documentation and a brief user guide on how to
use the applet.
- A tar.gz file containing the last working version of the project, linked to from the main project html page.
- In addition, you must go over all of your homeworks, select the last and best working version of each solution,
collect them all into a directory called AllHwk, tar and gzip it and make a link to it from the project html page.
tar and gzip.
Some additional features that you can implement include:
Roughly: a complete solution up to 1 is worth a B, a complete
solution up to 3 gives you an A-, and all - plus a working user interface - give you
an A. "Up to" means "up to and including".
"Complete" means everything: it compiles, it works, shows
sound programming style, it is thoroughly tested, well documented, readable, nice
user-interface, shows some creativity and is submitted in time.
- A function for performing a tree traversal from a given vertex v. The
visited nodes should be printed on the Java console
as they are visited.
- A function which returns a list of all the nodes reachable from
a given node v (as a list, not printed on the Java console). The list could
then be printed as a list.
- A function to list the path from a given node v to
another node u in the tree.