
CSci 131 -- Algorithms and Data Structures I
Project #4
Due Date: April 17, 2000
The purpose of this project is to give you 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 from Chaps. 2, 3, 4, 5, and 8. Project 5 will build on this project to develop a concurrent simulation.
In Project 3 you developed a generic table handler package that uses ordered arrays for the tables. In this project you have two main subtasks: develop a new client for the package, and then modify the package to support a different implementation of the tables.
You have three weeks for this project. You cannot hopeto have the full project completed in time unless you complete Part I by the end of the first week!
B. Now develop a package BankDatabase, that will use an instantiation of Tables_Generic to store account records. Instead of creating a single table for all records, use an array of 100 tables, one table for each branch. The database will maintain the array of tables, and also keep track of the latest account number that was assigned. Operations on this database will be
This is NOT an interactive program, just a package! Test it with a test program.
Students in a course like this need to get an oppportunity to write their own linked-list operations. Therefore, you are not permitted to use the generic list package from Chapter 9. Use dynamic allocation and access types directly in implementing the table operations; use the various procedures from Chapter 8 as your starting point.
You should develop this package as you did the original array version: one or two procedures at a time, testing as you go. You will be overwhelmed if you try to do it all at once. You should be able to reuse your Project 3 test programs here; just recompile using WITHs of the new packages instead of the old ones.
B. Now recompile the programs from Part I to use the new version of the table package instead of the old one.
Regarding test plans and user guides: write test plans for everything you change; write user guides for any package(s) that don't have them yet.