CS 474 - Machine Problem 1

Binary Search Trees

Due: 11:59 pm on Wednesday 10/8/2003

For this assignment you must work alone.

For this assignment, you must implement the BSTree class in Smalltalk. This class provides an abstract data type for Binary Search Trees. Recall that in a binary search tree, all values in the left subtree of a node are less than the value in the node and all values in the right subtree of a node are greater than to the value in the node. For this class we will not allow for duplicate values in the tree. Each node will store a single integer value. Your class should define appropriate methods and instance variables for creating, accessing and modifying binary search tree instances.

A GUI is not required for this project; however, up to 10 pts extra credit will be awarded for systems with a menu drriven GUI.

The following messages are to be supported by your class.

General Comments

Your program must be written in good programming style. This includes (but is not limited to) meaningful identifier names, a file header at the beginning of each source code file, a function header at the beginning of the function, proper use of blank lines and indentation to aide in the reading of your code, explanatory "value-added" in-line comments, etc.

The work you turn in must be 100% done by your own own. You are not allowed to share code with any other students (inside this class or not). You may discuss the project with other students; however, you may not show any code you write to another student nor may you look at any other student's written code.