#include #include #include #include "bstree.h" // include BinSTree class #include "treeprnt.h" // for Inorder scan #include "treescan.h" #include "strclass.h" #include "node.h" #include "treelib.h" #include "stack.h" int main(int argc, char argv[]) { BinSTree mySTree; cout << "TreeEmpty on mySTree is " << mySTree.ListEmpty() << endl; mySTree.Insert(16); mySTree.Insert(10); mySTree.Insert(5); mySTree.Insert(15); mySTree.Insert(20); mySTree.Insert(12); mySTree.Insert(14); mySTree.Insert(17); cout << "mySTree is size " << mySTree.ListSize() << "after inserting " << endl; mySTree.PrintVTree(mySTree.GetRoot(),5,60); cout << endl << endl; mySTree.Delete(15); cout << "mySTree is size " << mySTree.ListSize() << "after deleting 15 " << endl; mySTree.PrintVTree(mySTree.GetRoot(),5,60); cout << endl << endl; mySTree.Update(16); mySTree.Insert(10); mySTree.Insert(5); mySTree.Insert(15); cout << "mySTree is size " << mySTree.ListSize() << "after updating " << endl; mySTree.PrintVTree(mySTree.GetRoot(),5,60); cout << endl << endl; int T=15; int S=47; cout << endl << endl; cout << "Find(15) returns " << mySTree.Find(T); cout << endl << endl; cout << "Find(47) returns " << mySTree.Find(S); cout << endl << endl; mySTree.ClearList(); cout << "mySTree is size " << mySTree.ListSize() << "after clear " << endl; cout << endl << endl; }