Figure 5.11 creates a GradeBook
object (line 8). Line 10 invokes its displayMessage
member function to output a welcome message to the user. Line 11 invokes member function inputGrades
to read a set of grades from the user and keep track of how many students received each grade. The output window in Fig. 5.11 shows an error message displayed in response to entering an invalid grade (i.e., E
). Line 12 invokes GradeBook
member function displayGradeReport
(defined in lines 101–111 of Fig. 5.10), which outputs a report based on the grades entered (as in the output in Fig. 5.11).
18.221.187.207