org.problets.tutor
Class TutorManager

java.lang.Object
  extended by org.problets.tutor.TutorManager

public class TutorManager
extends java.lang.Object

Creates tutors for different problem types as necessary and uses the appropriate tutor for each problem. Serves as the single point of contact for clients to access the services of any particular tutor. Clients will only connect to TutorManager and not to any of the individual BaseTutor classes.

Author:
Amruth Kumar

Constructor Summary
TutorManager(StudentModel inStudent, LogModel inLog)
           
 
Method Summary
static void compareLearnObj(java.util.Vector oldLearnObj, java.util.Vector newLearnObj)
           
 void generateDelayedFeedback()
          Prompt the current tutor to generate delayed feedback
 java.util.Vector getActualAnswer()
          Returns the correct answer for this problem.
 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 java.util.Vector getPseudoDebugAnswer(java.util.Vector actualAnswer, int randomNumber)
           
static java.util.Vector getPseudoOutputAnswer(java.util.Vector actualAnswer, int randomNumber)
           
static java.util.Vector getPseudoStateAnswer(java.util.Vector actualAnswer, int randomNumber)
           
static java.util.Vector getStudentAnswer(Template template, int randomNumber, java.util.Vector actualAnswer)
           
 boolean gradeAnswer(AbstractLine studentAnswer)
           
static void main(java.lang.String[] args)
           
 void setupProblem(CodeModel inCode)
          Determines the appropriate tutor for the type of this problem, creates the tutor if it does not already exist, updates the tutor with the new problem (unnecessary step since CodeModel is updated in-situ), and sets up the tutor to execute the code so that the client can use the result for immediate feedback or error-flagging so that client can later call getGrade() and getNarration()
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TutorManager

public TutorManager(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 setupProblem(), generateDelayedFeedback()


getNarration

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


getActualAnswer

public java.util.Vector getActualAnswer()
Returns the correct answer for this problem. This method is to be called AFTER setupProblem(), generateDelayedFeedback()


setupProblem

public void setupProblem(CodeModel inCode)
Determines the appropriate tutor for the type of this problem, creates the tutor if it does not already exist, updates the tutor with the new problem (unnecessary step since CodeModel is updated in-situ), and sets up the tutor to execute the code so that the client can use the result for immediate feedback or error-flagging so that client can later call getGrade() and getNarration()


generateDelayedFeedback

public void generateDelayedFeedback()
Prompt the current tutor to generate delayed feedback


gradeAnswer

public boolean gradeAnswer(AbstractLine studentAnswer)

main

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

getStudentAnswer

public static java.util.Vector getStudentAnswer(Template template,
                                                int randomNumber,
                                                java.util.Vector actualAnswer)

getPseudoDebugAnswer

public static java.util.Vector getPseudoDebugAnswer(java.util.Vector actualAnswer,
                                                    int randomNumber)

getPseudoOutputAnswer

public static java.util.Vector getPseudoOutputAnswer(java.util.Vector actualAnswer,
                                                     int randomNumber)

getPseudoStateAnswer

public static java.util.Vector getPseudoStateAnswer(java.util.Vector actualAnswer,
                                                    int randomNumber)

compareLearnObj

public static void compareLearnObj(java.util.Vector oldLearnObj,
                                   java.util.Vector newLearnObj)