package grade; import java.util.List; /** * The Grades object is the output of a grader grading test attempts, and it is * derived from Section 2.6, Test Grading. */ public abstract class Grades { /** * List of tests taken by users, to be graded by the grader. */ List testsTaken; public Grades() { } /** * Returns a list of the testattempts that make up this student's grades */ public abstract List getTestAttempts(); /** * Adds a test attempt to the list of tests taken pre: // the test must not be in the list of tests taken (!testsTaken.contains(ta)); post: // the test must be in the list of tests taken and there must be one more total test taken (testsTaken'.contains(ta) && testsTaken'.size() == testsTaken.size()+1); */ public abstract void addTestAttempt(TestAttempt ta); /** * Delete a test attempt from the list of tests taken pre: // the test must be in the list of tests taken (testsTaken.contains(ta)); post: // the test must not be in the list of tests taken // and there must be one less total test taken (!testsTaken'.contains(ta) && testsTaken'.size() == testsTaken.size()-1); */ public abstract void removeTestAttempt(TestAttempt ta); }