The purpose of this program is to decide the final grades for a class.
There are five tests. The lowest score will be dropped.
The rest of the four tests will be counted as equal weights for the semester
average.
The grade is assigned as 'A' if the semester average >= 90;
'B' if the semester average is in the interval [80, 90);
'C' if the semester average is in the interval [70, 80);
'D' if the semester average is in the interval [60, 70);
'F' if the semester average is in the interval [0, 60);
Name Test1
Test2 Test3 Test4 Test5
Phillip
90 93 89
95 71
Ronald
88 72 76
90 81
Willie
14 42 52
85 41
Tobey
60 85 33
90 60
Sophia
80 66 90
100 63
Erica
53 21 71
70 43
Syntia
70 51 33
90 80
Steve
87 85 91
63 100
Declare a class, StudentRecord,
which has 4 data members as
name,
an array of 5 integers for scores,
average,
grade.
The class also has the following methods:
Create a main function to repeat the following jobs 8 times:
1. read data file one line at a time;
2. declare an object with the initial value from data file;
3. call the methods
to print the name, average, and grade as below.
