npublic
double finalAverage(StudentList
students)
n The average (mean) of the final
exam grades of the specified Students.
n require:
n
students.size() > 0
npublic
int finalExam
()
n This Student’s grade on the final
exam.
n
npublic
double finalAverage(StudentList
students)
n{
n int i, sum, count;
n count = students.size();
n sum = 0;
n i = 0;
n while ( i < count) {
n sum = sum +
students.get(i).finalExam();
n i = i+1;
n }
n return (double)sum / (double)count;
n}