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)); * */ void removeQuestion(TestQuestion question) { test.questions.contains(question); } /* SPEST PROBLEM: The checker outputs what seem to be the following incorrect errors: line 68:65 mismatched character 'i' expecting set null line 75:70 mismatched character 'i' expecting set null Invalid invocation: contains(antlr.TestGenerator$arguments_return@2626bd99) at line: 39 at character: 21 Invalid invocation: contains(antlr.TestGenerator$arguments_return@508b1bf4) at line: 48 at character: 28 Invalid invocation: equals(antlr.TestGenerator$arguments_return@5cd8597b) at line: 49 at character: 26 Invalid invocation: contains(antlr.TestGenerator$arguments_return@7fdac9db) at line: 49 at character: 61 */ /** * 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); }