The program in Fig. 7.24 creates an object of class GradeBook
(Figs. 7.22–7.23) using the two-dimensional array
of int
s named grades
(declared and initialized in lines 11–21). Line 11 accesses class GradeBook
’s static
constants students
and tests
to indicate the size of each dimension of array grades
. Lines 23–24 pass a course name and grades
to the GradeBook
constructor. Lines 25–26 then invoke myGradeBook
’s displayMessage
and processGrades
member functions to display a welcome message and obtain a report summarizing the students’ grades for the semester, respectively.
3.145.1.51