org.problets.tutor
Class FeedbackAdapter

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

public class FeedbackAdapter
extends java.lang.Object

To adapt the explanation based on feedback amount and student's needs

Author:
Amruth Kumar

Constructor Summary
FeedbackAdapter(StudentModel inStudent)
           
 
Method Summary
 java.util.Vector adapt(java.util.Vector explanation)
          Adapts the explanation based on Configuration.feedbackAmount and in the future, based on the student's learning objectives This method will be called by TutorModel the first time explanation has to be generated for each problem.
static void main(java.lang.String[] args)
           
 void setEnquiredLine(int lineNumber)
          Record the line on which the user clicked in the feedback Also note that the feedback must be refreshed
 java.util.Vector update(java.util.Vector completeExplanation, java.util.Vector currentExplanation)
          Method that will 1) Adapt the feedback to the new feedbackAmount if feedbackAmount changed 2) ELSE, Expand/collapse the feedback on a line if refresh is set 3) ELSE, Return the original explanation as is.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedbackAdapter

public FeedbackAdapter(StudentModel inStudent)
Method Detail

setEnquiredLine

public void setEnquiredLine(int lineNumber)
Record the line on which the user clicked in the feedback Also note that the feedback must be refreshed


adapt

public java.util.Vector adapt(java.util.Vector explanation)
Adapts the explanation based on Configuration.feedbackAmount and in the future, based on the student's learning objectives This method will be called by TutorModel the first time explanation has to be generated for each problem.


update

public java.util.Vector update(java.util.Vector completeExplanation,
                               java.util.Vector currentExplanation)
Method that will 1) Adapt the feedback to the new feedbackAmount if feedbackAmount changed 2) ELSE, Expand/collapse the feedback on a line if refresh is set 3) ELSE, Return the original explanation as is. This method is called by TutorModel the second and subsequent times the explanation for a problem has to be updated. It is implemented to be efficient - avoid re-adapting feedback unless either the feedback amount has changed or user has asked for further explanation of a line.


main

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