package edu.oakland.OUSoft.BST;

public class cseBST<E extends Comparable<E>> {
	
	private Node<E> root;
	
	public boolean contains(E o) {
		return containsRecurse(root, o);
	}
	
	private boolean containsRecurse(Node<E> node, E e) {
		if (node == null || e == null) {
			return false;
		}
		if (node.element.equals(e)) {
			return true;
		} else {
			if (e.compareTo(node.element) <= 0) {
				return containsRecurse(node.left, e);
			} else {
				return containsRecurse(node.right, e);
			}
		}
	}
	
	public boolean add(E e) {
	}
	
	public boolean remove(E e) {
		throw new UnsupportedOperationException("Not implemented yet.");
	}
	
	public int size() {
		throw new UnsupportedOperationException("Not implemented yet.");
	}
	
	public boolean isEmpty() {
		throw new UnsupportedOperationException("Not implemented yet.");
	}
	
	public void clear() {
		root = new Node<>(null);
	}
	
	private class Node<E> {
		E element;
		Node<E> left;
		Node<E> right;
		
		public Node(E e) {
			this.element = e;
		}
	}
	
}

@@ -520,16 +520,323 @@
 (E e) %7B%0A
+%09%09root = addRecurse(root, e);%0A%09%09return true;%0A%09%7D%0A%09%0A%09private Node%3CE%3E addRecurse(Node%3CE%3E node, E e) %7B%0A%09%09if (node == null) %7B%0A%09%09%09return new Node%3C%3E(e);%0A%09%09%7D else if (e.compareTo(node.element) %3C= 0) %7B%0A%09%09%09node.left = addRecurse(node.left, e);%0A%09%09%7D else %7B%0A%09%09%09node.right = addRecurse(node.right, e);%0A%09%09%7D%0A%09%09return node;%0A
 %09%7D%0A%09%0A%09pu

Implement add