GradeBook Class Header
GradeBook (Fig. 5.9) now contains five additional
private data members (lines 18–22)—counter variables for each grade category (i.e., A, B, C, D and F). The class also contains two additional
public member functions—
displayGradeReport. Member function
inputGrades (declared in line 14) reads an arbitrary number of letter grades from the user using sentinel-controlled repetition and updates the appropriate grade counter for each grade entered. Member function
displayGradeReport (declared in line 15) outputs a report containing the number of students who received each letter grade.