org.problets.tutor
Class OutputTutor

java.lang.Object
  extended by org.problets.tutor.BaseTutor
      extended by org.problets.tutor.OutputTutor
All Implemented Interfaces:
GradeConstants

public class OutputTutor
extends BaseTutor

Tutor to grade output problems

Author:
Amruth Kumar

Field Summary
static boolean ignoreWhiteSpace
           
 
Fields inherited from class org.problets.tutor.BaseTutor
DONT_KNOW_ANSWER
 
Fields inherited from interface org.problets.tutor.GradeConstants
CORRECT, GENERATED, gradeText, INCORRECT, MISSED, PARTIAL, TOTAL_STATS, UNATTEMPTED
 
Constructor Summary
OutputTutor(StudentModel inStudent, CodeModel inCode, LogModel inLog)
           
 
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 org.problets.tutor.BaseTutor
generateDelayedFeedback, getActualAnswer, getGrade, getNarration, setupProblem
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ignoreWhiteSpace

public static boolean ignoreWhiteSpace
Constructor Detail

OutputTutor

public OutputTutor(StudentModel inStudent,
                   CodeModel inCode,
                   LogModel inLog)
Method Detail

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 user
ordinality - 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)