01: /**
02:    This program tests the binary search tree class.
03: */
04: public class TreeTester
05: { 
06:    public static void main(String[] args)
07:    {  
08:       BinarySearchTree t = new BinarySearchTree();
09:       t.add("D");
10:       t.add("B");
11:       t.add("A");
12:       t.add("C");
13:       t.add("F");
14:       t.add("E");
15:       t.add("I");
16:       t.add("G");
17:       t.add("H");
18:       t.add("J");
19:       t.remove("A"); // Removing leaf
20:       t.remove("B"); // Removing element with one child
21:       t.remove("F"); // Removing element with two children
22:       t.remove("D"); // Removing root
23:       t.print();
24:    }
25: }
26: