Write a generic BST class that extends BinaryTree. BST should have the
following interface:
- boolean contains(T item) -- returns true if the given item is
in the tree, false otherwise.
- void insert(T item) -- inserts the given item into the tree.
Write a program to thoroughly test these methods. Note that you can
use the traversals to see if the tree is getting built correctly.
IMPORTANT: Base your code on the the BinaryTree
and BinarySearchTree classes and interfaces in L&C. Part of
this assignment is understanding and extending that code.
What to turn in
Turn in hardcopy of your BTNode, BinaryTree and BST classes and corresponding
interfaces plus the program you use to test your BST.
E-mail your programs
and writeups to me
with cpsc220 prog1 in the subject.