January 2014
Intermediate to advanced
736 pages
70h 43m
English
Figure E.18 creates an object of class GradeBook (Fig. E.17) 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 then invoke myGradeBook’s displayMessage and processGrades methods to display a welcome message and obtain a report summarizing the students’ grades for the semester, respectively.
1 // Fig. E.18: GradeBookTest.java 2 // GradeBookTest creates GradeBook object using a two-dimensional array 3 // of grades, then invokes method processGrades to analyze them. 4 public class GradeBookTest 5 { 6 // main ...
Read now
Unlock full access