-Outdor

**My MemberData Class**

public class ClubMember implements Comparable { //Class Properties public int memberID; //Member ID Number public String memberName; //Member Name //Constructor public ClubMember(int id, String name) { memberID = id; memberName = name; } //CompareTo Method public int compareTo(Object o1) { if ((this.memberID) > ((ClubMember) o1).memberID) { return 1; } else if ((this.memberID) < ((ClubMember) o1).memberID) { return -1; } else { return 0; } } //Print Method public void Print() { System.out.print("Member ID: " + memberID); System.out.println(" Member Name: " + memberName); } }

**My Binary Search Tree(so far)**

public class BinarySearchTree { //Node Structure class BinaryNode { //Node Properties Comparable data; //The data BinaryNode left; //Left child BinaryNode right; //Right child //Node Constructor BinaryNode(Comparable theData) { data = theData; left = right = null; } } //Tree Root protected BinaryNode root; //Constructor public BinarySearchTree() { root = null; } //Insert Initilizer public void insert(Comparable c1) { root = insert( c1, root); } //Insert Method for adding new nodes. protected BinaryNode insert(Comparable c1, BinaryNode bn1) { if (bn1 == null) { bn1 = new BinaryNode(c1); } else if (c1.compareTo(bn1.data) < 0) { bn1.left = insert(c1, bn1.left); } else if (c1.compareTo(bn1.data) > 0) { bn1.right = insert(c1, bn1.right); } return bn1; } //PrintTree Initilize public void PrintTree() { PrintTree(root); } //PrintTree method for printing entire tree. protected void PrintTree(BinaryNode bn1) { //Left if (bn1.left != null) { PrintTree(bn1.left); } //Print bn1.data.Print(); // <---- problem Lies here //Right if (bn1.right != null) { PrintTree(bn1.right); } } }