Fall2009-assignment6

Fall2009-assignment6 - Programming Systems Design CSCI 455...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Systems Design CSCI 455 FALL 2009 Dr. K. Narayanaswamy Programming Assignment # 6 Due Date: 10/18/2009 (11:59:59 p.m.) Goal This assignment requires you to understand how to manage a collection of structure objects in a way that resembles a real-world database. It significantly extends the functionality of Assignment 5 by allowing for you to add students and delete students from the collection. You will learn to use algorithms such as insertion sort and sequential or binary search. We will improve the efficiency of these algorithms as we make further progress in the days to come. You are expected to learn and to design and use functions in C++ using the general style of the examples done in class, including declaration of parameters. Task The program will manage a database of Student objects. As in Assignment 5, 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
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
contents will be wiped out completely and re-initialized when this command is executed. The data in the array 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. 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.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2009 for the course CSCI 455X at USC.

Page1 / 8

Fall2009-assignment6 - Programming Systems Design CSCI 455...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online