January 2014
Intermediate to advanced
736 pages
70h 43m
English
Previous versions of class GradeBook process a set of grades entered by the user, but do not maintain the individual grade values in instance variables of the class. Thus, repeat calculations require the user to reenter the same grades. One way to solve this problem would be to store each grade entered in an individual instance of the class. For example, we could create instance variables grade1, grade2,..., grade10 in class GradeBook to store 10 student grades. But this would make the code to total the grades and determine the class average cumbersome, and the class would not be able to process any more than 10 grades at a time. We solve this problem by storing grades in an array. ...
Read now
Unlock full access