package grade; import java.util.Collection; import tests.*; import questions.*; /** * The Grade object is derived from Section 2.6, Test Grading. */ public abstract class Grade { /** * The test data field is the test to grade. */ Test test; /** * The testResults data field is a collection of the test results for the * users having taken the test. */ Collection testResults; /** * The questionResults data field is a collection of the average results on * each question of the test. */ Collection questionResults; /** * The studentQuestionResults data field is a collection of the results for * each user on each question. */ Collection studentQuestionResults; /** * RemoveQuestion lets an instructor remove a question from a test, reasons * for doing so might be that the question turned out to be too hard. * pre: // // The given test question is in the collection of questions in the test. // test.questions.contains(question); post: // // A test question is in the output collection of test questions if and // only if it is not the question to be removed and it is in the input // collection of test questions. // forall (TestQuestion tq_other ; test.questions'.contains(tq_other) iff !tq_other.equals(question) && test.questions.contains(tq_other)); * */ abstract void removeQuestion(TestQuestion question); /** * ViewTestResults is called when a user presses the 'Student' item in the * dropdown that can be seen in Figure 2.6.2. The result from calling this * method is the screen seen in Figure 2.6.1. */ abstract void viewTestResults(); /** * ViewQuestionResults is called when a user presses the 'Question' item in * the dropdown that can be seen in Figure 2.6.2. The result from calling this * method is the screen seen in Figure 2.6.3. */ abstract void viewQuestionResults(); /** * ViewStudentQuestionResults is called when a user presses a question in the * table shown in Figure 2.6.3. The result from calling this method is the * screen shown in Figure 2.6.8. */ abstract void viewStudentQuestionResults(Question question); }