/* * Manages Grades for a Student */ public class Student { private String studentName; private int numQuizzes; private int totalScore; /* * Constructs the Student with a Name * @param theName Name of Student */ public Student(String theName) { this.studentName = theName; } /* * Returns the Name of the student * @return Name of Student */ public String getName() { return this.studentName; } /* * Adds a quiz to the database of quizzes * @param score Score on quiz */ public void addQuiz(int score) { this.totalScore = this.totalScore + score; this.numQuizzes++; } /* * Returns the total score of all quizzes * @return Total score of all quizzes */ public int getTotalScore() { return this.totalScore; } /* * Returns average of all quizzes * @return Average of all quizzes */ public double getAverageScore() { return this.totalScore/this.numQuizzes; } }