previous | start | next

Public interface for Tree and Node classes

class Tree
{
   public Tree() { . . . }
   public void insert(Comparable obj) { . . . }
   public void print() { . . . }

   private Node root;

   private class Node
   {
      public void insertNode(Node newNode) { . . . }
      public void printNodes() { . . . }

      public Comparable data;
      public Node left;
      public Node right;
   }
}


previous | start | next