Implement a class Student. For the purpose of this exercise, a student has a name and a total quiz score. Supply an appropriate constructor and methods getName(), addQuiz(int score), getTotalScore(), and getAverageScore(). To compute the latter, you also need to store the number of quizzes that the student took.

Supply a StudentTester class that tests all methods.

Complete the following files:

Student.java

/** A student who is taking quizzes. */ public class Student { ... /** Constructs a student with a given name. @param n the name */ public Student(String n) { ... } /** Gets the name of this student. @return the name */ public String getName() { ... } /** Adds a quiz score. @param the score to add */ public void addQuiz(int score) { ... } /** Gets the sum of all quiz scores. @return the total score */ public double getTotalScore() { ... } /** Gets the average of all quiz scores. @return the average score */ public double getAverageScore() { ... } }

StudentTester.java

/** This program tests the Student class. */ public class StudentTester { public static void main(String[] args) { Student student = new Student("Cracker, Carla"); // TODO: Add some quizzes // TODO: Print actual and expected name, total score and average score } }

StudentTester2.java