Back to the Lab Index

Lab 10 - Binary Search Tree Database
Due: Wednesday, April 18, 2007 at 11:59PM

Zipped collection of support files .
Browser-Friendly version of support files

The Assignment

We ask you to implement a simple in-memory database based on a BinarySearchTree. The database will let the user insert, delete, and find (and display) records, as well as change certain fields within records, and print a sorted list of all records in either forward or reverse order.

The details of this assignment are in the comments within the provided skeleton and example files. Please read them carefully. But, the following "plan of attack" might prove useful to you:

  1. Read the skeleton and example files a few time -- make sure you understand the requirements.
  2. Then, decide what type of database you want to build. A collection of CDs? Recipes? Inventory? Etc?
  3. Next, you should implement and test the basic inventory record. We've provided a very simple example called Food.
  4. Then, you should complete the BinarySearchTree that we've provided. Please pay careful attention to the comments, because they explain important requirements. As always, you should not change the interface, but you are more than welcome to add helper methods.
  5. Finally, you should build an interactive database for whatever record type you created. The Database class should basically be the front end that creates the database by creating the Binary SearchTree, and then allows the user to insert records, find (and display) records, delete records, and change the value of fields within records.

This is an open-ended project -- have fun and build great things.