Student. For the purpose of this exercise, a student has
getName()
addQuiz(int score)
getTotalScore(), and
getAverageScore()
To compute the latter, you also need to store the number of quizzes that the student took.
Here's a sample run of such a program:
public static void main(String[] args) {
Student a = new Student("Larry");
a.addQuiz(10);
a.addQuiz(9);
a.addQuiz(8);
System.out.println("Grade report for: " + a.getName());
System.out.println("Total score: " + a.getTotalScore());
System.out.println("Average score: " + a.getAverageScore());
}
Should produce:
Also add afrilled.cs.indiana.edu%java Student Grade report for: Larry Total score: 27.0 Average score: 9.0 frilled.cs.indiana.edu%
report(...) method that allows the student to
print a grade report.