June 2006
Intermediate to advanced
1344 pages
42h 52m
English
Chapters 3–6 presented classes containing simple methods that had at most one parameter. Methods often need to receive more than one piece of information to perform their tasks. We now consider how to write methods with multiple parameters.
The application in Figs. 7.4–7.5 uses a user-declared method called Maximum to determine and return the largest of three Integer values entered by the user. When the application begins execution, class GradeBookTest’s Main method (lines 4–11 of Fig. 7.5) creates one object of class GradeBook (line 6) and uses this object to call method InputGrades (line 9). This method is declared in lines 43–57 of class GradeBook ...
Read now
Unlock full access