CS210 Data Structures & Algorithms I
LAB 3
w/b 8/11/99
Mr. Tom Lysaght
Assignment due Friday, November 19th
Login at a PC using login PC1 and NO password (just press RETURN).
Using functional decomposition design a program which stores student data as an array of records. The following details are input for each student: FirstName, LastName, StudentNumber and average grade (GradePointAvg).
The program should allow the user to add a new record, print a record and find a record based on FirstName.
Write code for the above program using a struct as a data structure for each student's data i.e.,
Struct Student
{
string FirstName;
string LastName;
int StudentNum;
double GradePointAvg;
}
Declare an array of struct:
Student StudentData[MAX_SIZE];
Void PrintRecord(Student s);
and a function to print out all student details in the array:
Void PrintData(Student SData[ ], int numEntries);
Use a counter numEntries to hold the number of records input to the array. Use the array name in the call to a function e.g.,
AddRecord(StudentData,numEntries).
Save your work on a floppy disk. Also hand up a printout of the refinement and code.
The refinement may be handwritten.