org.problets.tutor
Class OutputTutor
java.lang.Object
org.problets.tutor.BaseTutor
org.problets.tutor.OutputTutor
- All Implemented Interfaces:
- GradeConstants
public class OutputTutor
- extends BaseTutor
Tutor to grade output problems
- Author:
- Amruth Kumar
Method Summary |
java.util.Vector |
diagnose(java.util.Vector actualAnswer,
java.util.Vector studentAnswer)
Uses rule-based expert system to diagnose why a student's answer for
output problems is incorrect. |
boolean |
gradeAnswer(AbstractLine studentAnswer)
IDEALLY, Implement this to provide polymorphic behavior usable for error-flagging -
Cannibalize code in sortStudentAnswer() |
boolean |
gradeAnswer(LineOutput inOutput,
int ordinality)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ignoreWhiteSpace
public static boolean ignoreWhiteSpace
OutputTutor
public OutputTutor(StudentModel inStudent,
CodeModel inCode,
LogModel inLog)
diagnose
public java.util.Vector diagnose(java.util.Vector actualAnswer,
java.util.Vector studentAnswer)
- Uses rule-based expert system to diagnose why a student's answer for
output problems is incorrect. Attaches the explanation to the end of
the currentGrade vector.
gradeAnswer
public boolean gradeAnswer(LineOutput inOutput,
int ordinality)
- Parameters:
inOutput
- The new LineOutput object entered by the userordinality
- The size of the student's answers so far, also how many'th output this is
Retruns true if the output is correct and false otherwise
gradeAnswer
public boolean gradeAnswer(AbstractLine studentAnswer)
- IDEALLY, Implement this to provide polymorphic behavior usable for error-flagging -
Cannibalize code in sortStudentAnswer()
- Specified by:
gradeAnswer
in class BaseTutor
main
public static void main(java.lang.String[] args)