
CSci 131 -- Data Structures
Project #3
Due Date: October 20, 1998
The purpose of this project is to give you some more practice in dealing with generic packages, and illustrate the advantages of a clearly-specified generic interface in supporting multiple implementations and multiple clients. This project uses material mostly from Chaps. 5 and 6. If you do the first part of the project this week, it will definitely help you prepare for the midterm next Tuesday.
You are hired by the railroad company to develop a new computer system for keeping track of passenger cars (carriages). Here is the information to be contained in a railway car record:
A car can be
Each car has a unique number (up to 4 digits). Each sleeper also has a name (typically a place name like Yellowstone Park), up to 20 letters. The other types of cars do not have names.
Each car has a certain weight (in kilos).
For each car we need to know its purchase date and purchase price
The car record will be a variant record; the car data base will be an instance of Tables_Generic.
You have two main subtasks in this project:
If you completed Project 2, you should be able to use your Tables_Generic package without a single change.