package grade; import questions.*; import users.*; /** * The QuestionResult object is derived from Section 2.6, Test Grading, and can * be seen in Figure 2.6.7 as a tuple consisting of a student and their answer, * score, and the instructor's comment. */ public abstract class StudentQuestionResult { /** * The question data field contains the question from a test. */ Question question; /** * The student data field contains the student responding to the question. */ Student student; /** * The answer data field contains the answer from a student to the question. */ Answer answer; /** * The score data field contains the score for the answer to the question. */ double score; /** * The comment data field contains the comment made by an instructor on a * response to a question. */ String comment; /** * SetScore lets an instructor put a score when grading the answer to a * question, and it can be seen in Figures 2.6.8-2.6.14. */ abstract void setScore(double score); /** * SetComment lets an instructor insert a comment on a question that a test * taker has answered, to describe and motivate the grading. It can be seen * in Figures 2.6.8-2.6.14. */ abstract void setComment(String comment); /** * GoBack takes the user back to the previous screen. This method is called * when the 'Back' button seen in Figure 2.6.8 is pressed. */ abstract void goBack(); /** * OpenIDE opens a code answer in a new IDE window so for the instructor to * inspect the answer. This method is called when a user presses the 'View in * IDE' button that can be seen in Figure 2.6.12. */ abstract void openIDE(CodeQuestion question); }