Member Function getAverage
processGrades next calls member function
getAverage (line 45) to obtain the average of the grades. Member function
getAverage (declared in line 23 of Fig. 7.15 and defined in lines 88–98 of Fig. 7.16) totals the values in
array grades before calculating the average. The averaging calculation in line 97 uses
grades.size() to determine the number of grades being averaged.