Due Date: February 6, 1997
The first programming project involves writing a simple student information system. The type definitions for the student information system are the following:
TYPE Student_Record IS
RECORD
Name: String(1..15);
Birth_Date: Date;
Tuition: Quantity;
Amount_Paid: Quantity;
Grade_Point: Rational;
END RECORD;
Students: CONSTANT Integer := 35;
TYPE Student_File IS ARRAY(1..Students) OF Student_Record;
Your program should read in information for no more than 35 students from a file that you create and should enter that information in the Student_File array defined above. The birth date in the input file should consist of three integer values: month, day and year. The tuition and amount paid should be floating point numbers, and the grade point a pair of integers: total quality points and credit hours completed. Your program should convert the date information to type Date as defined by the Dates package. It should convert the tuition and amount paid to type Quantity defined in the Currency package. Finally, it should convert the grade point average to type Rational as defined in the Rationals package.
Once the information has been read in, your program should print out a report, including all the information in the file and also the amount owed for each student. In addition, the average age and average grade point average should be computed. For each student, the report should note whether the student's GPA is above average or below average. Use the Put procedures for Dates, Quantity, and Rationals as appropriate to output the values. The average age and grade point average should be output as floating point numbers.
Your program must use the packages Dates, Dates.IO, Currency, Currency.IO, Rationals, and Rationals.IO defined in the textbook. You must complete any incomplete parts of these packages.