This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Programming Systems Design CSCI 455 FALL 2009 Dr. K. Narayanaswamy Programming Assignment # 10 Due Date: 12/06/2009 (11:59:59 p.m.) NO LATE SUBMISSIONS WILL BE ACCEPTED Please submit what you have done by the deadline Goal This assignment has all the same external requirements as Assignment 9, but we require you to implement the database as a collection of CLASS objects using STL List implementation, rather than arrays or linked lists. Like Assignment 8 and 9, Assignment 10 will allow you to add students and delete students from the collection. The main difference is that you will program the database using STL List implementation. Task The program will manage a database of Student objects. As in Assignment 5, 6, 7, 8, and 9 the following are the attributes of a student: Last name: a string with only alphabetic characters. For formatting purposes, you may assume the names would be no longer than 15 characters; First name: a string with only alphabetic characters. For formatting purposes, you may assume the first name would be no longer than 15 characters; Social Security Number: a string. The social security numbers you accept must be 11 characters, with digits in positions 1, 2, 3, 5, 6, 8, 9, 10 and 11; and the - in positions 4 and 7. Phone Number: a string. A valid phone number will be of length 13, and will contain characters ( in position 1, ) in position 5, and - in position 9. All other characters must be digits. Age: an integer. You may assume this field will always be an integer, but the age must be a positive integer. Your program will support the following single character commands in a main command loop: I or i (Import Command) Prompts the user for a file name, and will initialize the database from the student data in that file. That means that existing database 1 contents will be wiped out completely and re-initialized when this command is executed. The data in the STL list must be maintained in sorted order sorted by social security number. The command should check for and report errors as the input file is processed. The format of the data and error checking requirements are identical to that in Assignment 5, 6, 7, 8, and 9. In all cases, IF there are any problems with the input, you should report the problem to the terminal to make the user aware with a line number on which the problem arises. You should also specify what action was taken with the input. You may assume the input will have the above items in the order stated in the input file. You do not have to do error checking beyond what is indicated explicitly in the assignment requirements. A or a (Add Command) Add a Student to the database you are maintaining your program should prompt for each of the student attributes (such as social security number, last name, first name, phone, and age). Make sure that the attributes provided as values satisfy the requirements e.g., social security number must be provided as values satisfy the requirements e....
View Full Document