Project Preparation

Programming projects are to be submitted in paper form, because the graders will need to make notes on them. There are just too many students to make e-mail submission practicable. Be sure your name and recitation section are on each piece, in case they get accidentally separated. Put the pieces together with a paper clip, not a staple. It is acceptable to attach a copy of the project handout and mark it as Problem Statement.

Your submission must contain:

A user guide and test plan (see below), printed from a computer or neatly hand-written. The document must show, on the first page, your name, e-mail address, recitation section, project number, date submitted).

One or more listing (.lsb) files, according to the project assignment sheet.

One or more compile/link/execute scripts, according to the assignment sheet. Run the program with enough test data that you can show that it works as advertised. Choose test data carefully!

Each program source file must have, at the top of the listing, a "banner comment" in the following form:

Indentation and comments in the program should follow the style of those in the book and project example. Use comments to document each identifier.


------------------------------------------------------------------------------
-- Name: Student Name 
-- E-mail Address: student@seas.gwu.edu 
-- Csci 131-10, 30 
-- 
-- Project #2 
-- Date: Feb. 23, 1995 
-- 
-- Brief Project Description: 
------------------------------------------------------------------------------

1 - In the text book, section 3.5 talks about the implementation of
an employee database application. The following two pages give a slightly
different specification for the Table package. Using the specifications
given with this assignment, implement the bodies for these specifications.
You will need to use the employee package later, so be careful not to put
any code for the Employee package in the Table package. Since the Employee
package is WITHed in the Table package, this can be done by calling functions
in the Employee package from the Table package.

Develop the application in the procedure MenuHandler, with is file prog310.ada
in the book, and program MenuHandler.adb in the programs 131 directory.
Note that you will have to WITH both the Employee and the Table package
in the MenuHandler procedure.

2 - Change the program above to work with a simple record which is a
single integer field. You should not have to change the Table package except
to change the package in the WITH statement.

Included with this title page are:

1. A print-out of employee and tables specification file and body of
the packages.

2. A print-out of the listing of the two packages. 

3. A print-out of MenuHandler body file. 

4. A print-out of the listing of MenuHandler. 

5. A print-out of the script file (turnin) displaying sample input and
how the program deals with it. 

6. A print-out of IntRec and inttables specification file and body of
the packages. 

7. A print-out of the listing of the two packages.

8. A print-out of IntMenuHandler body file.

9. A print-out of the listing of IntMenuHandler.

10. A print-out of the script file (turnin) displaying sample input
and how the program deals with it.

11. A print-out of the TestPlan.

12. A print-out of the UserManual.


Project Grading:

Your grade will be assigned on the basis of 20 points; partial credit is always given where appropriate. Unless otherwise specified, here is the grade allocation.

Note that complete and correct user document and test plan will earn 50% of the grade, even if you do not complete the program, and that a correctly developed and formatted program will earn an additional 20%, even if it does not work. This weighting of grades is quite intentional, and is typical of modern computing courses. It is also typical in industry for the coding part of a project to absorb only 30% of the resources.

Schedule

Your project is due on the assigned date at the beginning of class. A project brought in during the class will normally be counted as late.

Many teachers refuse to accept late projects at all, but in this course you are permitted to turn in projects at any time. Your grade on the project will, however, be reduced by 4 points, or 20%, for each week it is late.

Note that if you are extremely busy, you can buy an additional week of time for a 4-point price. You do not need permission to do so; just turn it in late. The "lateness fee" will be waived only for documented medical situations or other unusual circumstances. "The computer was down" is not an unusual circumstance; our response will always be "the computer often goes down; you should have allowed yourself more time."

Where Is Ada Available?

The "officially supported" location for Ada program preparation and compilation is the SEAS Computing Facility Unix network, and the GNU Ada 95(GNAT) compiler. There are terminals and connected microcomputers all over campus; there are also dial-up lines and telnet connections so that, once you have a SEASCF account, you can log in remotely from work or home.

If you have your own DOS-family computer available, you are welcome to use it. You can download a free DOS version of GNAT together with a nice editor and graphics libraries. See the file info/ez2load.txt.


Sample User Manual:

------------------------------------------------------------------------------
-- Name: Student Name 
-- E-mail Address: student@seas.gwu.edu 
-- Csci 131-10, 30 
-- 
-- Project #
-- Date: Feb. 23, 1995 
-- 
-- Brief Project Description: 
-- 
-- This is a user manual for the tables. The tables functions are 
-- are accessed through the menu program. 
-- 
------------------------------------------------------------------------------


INTRODUCTION 

This manual describes how to access the table functions using the menu
handler program. It gives some background on what are the table functions
and what will they be used for. 

First, what is a table. A table is an array of records, it is like a
small scale database. The tables functions are the functions used to initialize,
add, retrieve, delete, and print the records. 


PROCEDURE

Menu choice I: This menu option will cause the table to be initialized
and therefore be reset (empty table with no records). It should be used
when first entering the program and whenever you want to erase the entire
table.

Menu choice A: This menu option is used to add a record to the table.
When adding a record the program checks if the record already exists, and
if so it will give the user the option to change the ID field or discard
the record. The table is kept as an ordered array, therefore all the records
are stored in an ascending order. 

Menu choice D: This menu option is used delete a record from the table.
If the record exists it will be deleted from the table, and if the record
does not exists an error message will be displayed 

Menu choice R: This menu option is used to retrieve and display a single
record from the table. If the record exists, it will be displayed. If the
record does not exists, an error message will be displayed. 

Menu choice P: This menu option is used to display (print) the entire
table. This will print the entire table in an ascending order (traverse
the table). 

Menu choice Q: This menu option is used to quit the program and exit
back to shell. 


CAVEATS AND BUGS 

The tables package does not handles the actual input of the records.
It counts on the records package (such as employee) to handle the input
of the record. In employee the record is entered robustly, using the existing
functions in RobustInput, and Enumeration_IO, and a small exceptions loop
to make sure all the input entered into the record fields does not cause
an error and therefore does not propagates to the table functions. 

An error would arise when more than 25 records are tried to be stored
in the table since we defined the table to have 25 records. 


Sample Test Plan:

------------------------------------------------------------------------------
-- Name: Student Name 
-- E-mail Address: student@seas.gwu.edu 
-- Csci 131-10, 30 
-- 
-- Project #2 
-- Date: Feb. 23, 1995 
-- 
-- Brief Project Description: 
-- 
-- This is a test plan for testing the package tables (for both record
-- types employee, and integer we use the same testing plan). We use
-- the package menuhandler to access the procedures within the tables
-- package. In this plan I test all the procedures in the package tables
-- 
------------------------------------------------------------------------------

The package tables consists of five procedures which are accessed by
the user and one procedure which was added to use a binary search. The
binary search is used by the other procedures and therefore will not be
tested directly. 

Initialize Table: To test this procedure, call it when the tables has
information and see it clears the table and when the table is empty to
see it has no side effects. (Use menu option I) 

See page 68 in your text book for a complete example of a test plan.