Source-code file GradeBook.cpp
(Fig. 5.10) contains the member-function definitions for class GradeBook
. Lines 11–15 in the constructor initialize the five grade counters to 0
—when a GradeBook
object is first created, no grades have been entered yet. These counters will be incremented in member function inputGrades
as the user enters grades. The definitions of member functions setCourseName
, getCourseName
and displayMessage
are identical to those in the earlier versions of class GradeBook
.