CS-240
Data Structures
Project 4
Objectives: Upon completion of this project the student shall be:
1. Familiarized with the construction of and retrieval of programatic data from a Binary Search Tree.
2. Familiarized with tree traversal via an iterator class.
Definition: Develop a Binary Search Tree (BST) template class (using a linked rather than an array based implementation) that will support the operations of insertion (insert(n)) and retrieval (find(n)). Traversal shall be done by creating an iterator class to use with the tree class, the iterator shall implement an inorder traversal of the tree (this way when you traverse the tree to print out the variables/values they will be printed in alphabetic order) .
Once you have developed the BST class and its associated iterator class, use them to replace the list class used in Project 2 for the storage of variable information (This will mean that the private data of the BST class will need a field for the key (variable name) and another field for its value).
Test your programs with at least three sample runs using a variety of expressions the will use a minimum of 10 variables. Submit your test files and source code to the class server and notify your CA/TA when it is ready to be graded.
last modified: 11/08/2004 - RVS