The George Washington University
School of Engineering and Applied Science
Department of Computer Science
CSci 131 -- Algorithms and Data Structures I
Project #2
Due Date: start of class, Monday, February 11, 2002
http://www.seas.gwu.edu/~csci131/spring02/131s02p2.html
This project depends on material through Chapter 3 of the data structures book, as well as on the document Incremental ADT Development Using Stubs, which is online and linked from the course web page.
From Project 1, you now have a basic ADT package Cars for constructing, and retrieving fields from, car records, and a companion child package Cars.IO for reading and writing car records. In this project you are going to develop a table manager, which will be the basis for doing database-type operations on collections of car records. You will use incremental development in this process.
The file car_tables.ads contains the interface (specification) for an ADT package that provides a type TableType. Each TableType variable uses an unsorted array to store up to 25 car records. Methods are provided to insert, delete, retrieve, and replace records, as well as to empty the table and to display its current contents.
The file basic_test_car_tables.adb contains a simple test program to help you begin the incremental development process. This program just opens a file and reads 5 records, inserting each one into a table and displaying the table contents after each insertion.
Proceed as follows: