Class GradeBookTest That Demonstrates Class GradeBook

Figure 7.19 creates an object of class GradeBook (Fig. 7.18) using the two-dimensional array of ints named gradesArray (declared and initialized in lines 10–19). Lines 21–22 pass a course name and gradesArray to the GradeBook constructor. Lines 23–24 display a welcome message containing the course name, then line 25 invokes myGradeBook’s processGrades method to display a report summarizing the students’ grades for the semester.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.