testtool.teacher_app.grade_view
Class GradeTest

java.lang.Object
  extended by testtool.teacher_app.grade_view.GradeTest

public abstract class GradeTest
extends java.lang.Object

The GradeTest class is derived from the Test Grader View in Section 2.6 of the requirements. It provides operations for the teacher to grade tests. This class contains a Lecture field that has course and section information for the test. The second data field is a list of each student's test to be graded. The last field is the currently selected test that is being graded by the user.


Nested Class Summary
private static class GradeTest.QuestionSort
          QuestionSort resembles all the ways you can sort the questions of each test.
private static class GradeTest.TestSort
          TestSort resembles all the ways you can sort the list of tests.
 
Field Summary
private  Test currentTest
           
private  Lecture lecture
           
private  java.util.List<Test> tests
           
 
Constructor Summary
GradeTest()
           
 
Method Summary
abstract  void gradeTests()
          gradeTests automatically grades all questions with exact answers for every test in this.tests.
abstract  void sendToGradingProgram()
          sendToGradingProgram sends this.tests to the grader program.
abstract  void setScore(int question, int correct, int possible)
          setScore modifies this.currentTest.questions.get(question).score with correct and possible parameters.
abstract  void sortQuestions(GradeTest.QuestionSort sortFlag)
          sortQuestions sorts this.currentTest.questions by the order specified by the parameter sortFlag.
abstract  void sortTests(GradeTest.TestSort sortFlag)
          sortTests sorts this.tests by the order specified by the parameter sortFlag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lecture

private Lecture lecture

tests

private java.util.List<Test> tests

currentTest

private Test currentTest
Constructor Detail

GradeTest

public GradeTest()
Method Detail

gradeTests

public abstract void gradeTests()
gradeTests automatically grades all questions with exact answers for every test in this.tests. It also will setup all short answer to highlight any keywords in the student's answer.


sendToGradingProgram

public abstract void sendToGradingProgram()
sendToGradingProgram sends this.tests to the grader program.


sortTests

public abstract void sortTests(GradeTest.TestSort sortFlag)
sortTests sorts this.tests by the order specified by the parameter sortFlag.


sortQuestions

public abstract void sortQuestions(GradeTest.QuestionSort sortFlag)
sortQuestions sorts this.currentTest.questions by the order specified by the parameter sortFlag.


setScore

public abstract void setScore(int question,
                              int correct,
                              int possible)
setScore modifies this.currentTest.questions.get(question).score with correct and possible parameters. If possible is 0, or not provided, then only correct modifies the question score.