7.6. GradeBook Case Study: Declaring Methods with Multiple Parameters

Chapters 36 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.

Declaring Method Maximum

The application in Figs. 7.47.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 ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, 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.