org.problets.tutor
Class DemandTutor

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

public abstract class DemandTutor
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
DemandTutor(StudentModel inStudent, LogModel inLog)
           
 
Method Summary
 void generateFeedback()
          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.
static void main(java.lang.String[] args)
           
 void update(CodeModel inCode)
          This must be called first for every new problem
 
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

DemandTutor

public DemandTutor(StudentModel inStudent,
                   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. DON'T use this for routine purposes, as it duplicates program execution. If the program is executed routinely a second time, the output of the program is doubled.


update

public void update(CodeModel inCode)
This must be called first for every new problem


generateFeedback

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


main

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