// implementation of BST // wdg 2009 #ifndef BINARY_SEARCH_TREE_H #define BINARY_SEARCH_TREE_H #include "BSTNode.h" class BinarySearchTree { public: BinarySearchTree( ); virtual void insertItem(ItemType it); // to allow extension bool deleteItem(ItemType it); bool findItem(ItemType it) const; void dumpItemsInOrder( ) const; protected: // to enable extension to RedBlack trees BSTNode *root; int count; bool insertItem(BSTNode *newNode); BSTNode *search( ItemType it ) const; void inOrder(BSTNode *v) const; }; #endif