org.problets.tutor
Class BaseTutor

java.lang.Object
  extended by org.problets.tutor.BaseTutor
All Implemented Interfaces:
GradeConstants
Direct Known Subclasses:
DebugTutor, OutputTutor, StateTutor, SynthesisTutor

public abstract class BaseTutor
extends java.lang.Object
implements GradeConstants

Serves as the base class for all the tutor classes such as OutputTutor, DebugTutor, StateTutor, etc.

Author:
Amruth Kumar

Field Summary
static java.lang.String DONT_KNOW_ANSWER
           
 
Fields inherited from interface org.problets.tutor.GradeConstants
CORRECT, GENERATED, gradeText, INCORRECT, MISSED, PARTIAL, TOTAL_STATS, UNATTEMPTED
 
Constructor Summary
BaseTutor(StudentModel inStudent, CodeModel inCode, LogModel inLog)
           
 
Method Summary
 void generateDelayedFeedback()
          Forces the tutor to generate and save the grade and narration.
 java.util.Vector getActualAnswer()
          Returns the correct answer for use by the client - Used for testing.
 java.util.Vector getGrade()
          Returns the student's grade, actual answer and student answer.
 java.util.Vector getNarration()
          Returns the adapted narration of code execution.
abstract  boolean gradeAnswer(AbstractLine studentAnswer)
           
static void main(java.lang.String[] args)
           
 void setupProblem()
          Sets up the problem for all three types of feedback
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DONT_KNOW_ANSWER

public static final java.lang.String DONT_KNOW_ANSWER
See Also:
Constant Field Values
Constructor Detail

BaseTutor

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

getGrade

public java.util.Vector getGrade()
Returns the student's grade, actual answer and student answer. This method is to be called AFTER generateFeedback()


getNarration

public java.util.Vector getNarration()
Returns the adapted narration of code execution. This method is to be called AFTER generateFeedback()


getActualAnswer

public java.util.Vector getActualAnswer()
Returns the correct answer for use by the client - Used for testing. This method is to be called AFTER generateFeedback()


setupProblem

public void setupProblem()
Sets up the problem for all three types of feedback


generateDelayedFeedback

public void generateDelayedFeedback()
Forces the tutor to generate and save the grade and narration. CodeFeedbackManager calls generateFeedback() only once. Thereafter, GradeView calls getGrade() and NarrationView calls getNarration().


gradeAnswer

public abstract boolean gradeAnswer(AbstractLine studentAnswer)

main

public static void main(java.lang.String[] args)