Class GradeBookTest That Demonstrates Class GradeBook
The application of Fig. E.14 creates an object of class GradeBook
(Fig. E.13) using the int
array gradesArray
(declared and initialized in line 10 of Fig. E.14). Lines 12–13 pass a course name and gradesArray
to the GradeBook
constructor. Line 14 displays a welcome message, and line 15 invokes the GradeBook
object’s processGrades
method. The output summarizes the 10 grades in myGradeBook
.
Get Android™ How to Program, Second 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.