// CSE 143, Winter 2009, Marty Stepp // This client creates a binary search tree of integers, prints and searches it. // You can see a nice visualization of binary trees in jGRASP's debugger. public class TreeMain { public static void main(String[] args) { // construct a binary search IntTree tree = new IntTree(); tree.add(9); tree.add(6); tree.add(7); tree.add(14); tree.add(11); tree.add(19); tree.printSideways(); System.out.println(tree.contains(9)); System.out.println(tree.contains(14)); System.out.println(tree.contains(11)); System.out.println(tree.contains(7)); System.out.println(tree.contains(-1)); System.out.println(tree.contains(0)); System.out.println(tree.contains(42)); System.out.println(tree.contains(10)); } }