TeachJava Wednesday
[PLT logo] TeachJava!

Resources

Wednesday


Morning:

Morning Laboratory:

Afternoon:

Afternoon Laboratory:

  1. Define a composite class hierarchy with the class/interface BinaryTree at the apex representing the preceding data definition. The class should include appropriate constructors and accessors for each concrete class and appropriate definitions of the method toString() method so that: Test your code.

  2. Define a visitor interface called BinaryTreeVisitor for the BinaryTree composite hierarchy. Using this interface, define visitors to compute: Write test code for your various visitor operations in either the BinaryTee class or a separate Test class.