CPSC 215 Lab 9, 11/11/99 This lab asks you to write a number of operations on binary (search) trees. Be sure to write a "main" method to demonstrate your methods - and be sure to indicate exactly what's being printed by your demonstration. I've provided you a template with some of the code I wrote in class today (note since we didn't test it, there may be syntax errors). -------------------------------------------------------------------------- class node { int head; node left; node right; public node(int h, node l, node r) { head = h; left = l; right = r; } } // end class node public class trees { node root; // you might not even need this. // determines if x is in tree T: public staticboolean intree(int x, node T) { if (T == null) return false; else if (x == T.head) return true; else return (intree(x,T.left) || intree(x,T.right)); } // end intree // determines if x is in *binary search* tree T public static boolean instree(int x, node T) { if (T == null) return false; else if (x == T.head) return true; else if (x < T.head) return instree(x,T.left); else return instree(x,T.right); } // non-recursive version of above function public static boolean iter_instree(int x, node T) { boolean temp = false; // indicates if x has been found node current = T; while ((current != null) && (!temp)) { if (x == current.head) temp = true; else if (x