mauda.feedback
Class SimpleFeedback

java.lang.Object
  extended by mauda.feedback.SimpleFeedback
All Implemented Interfaces:
ExerciseUpdateListener
Direct Known Subclasses:
DemandFeedback, ErrorFlagging, FaultFeedback, ImmediateFeedbackAndErrorCorrection, NoTutor, SolutionFeedback

public abstract class SimpleFeedback
extends java.lang.Object
implements ExerciseUpdateListener

The base-class for feedback-types. All specific feedback- types have to extend this class.

Author:
Markus Krebs

Field Summary
static FeedbackGenerator feedbackGenerator
           
static int MAX_TRIES
          Defines the amount of the maximal tries for incorrect operations.
 
Constructor Summary
SimpleFeedback(FeedbackExercise exercise)
          Creates a SimpleFeedback
 
Method Summary
 void displayLoadingMessage()
          This method will be called, when a new exercise is start loading.
 boolean exerciseFinished()
          Returns if the exercise was finished.
 void exerciseUpdate(ExerciseUpdateEvent e)
          Invoked when an Event occures
 Evaluator getEvaluator()
          Gets the Evaluator
 FeedbackGenerator getFeedbackGenerator()
          Gets the FeedbackGenerator
 int getFeedbackTypeID()
          Returns the FeedbackTypeID
 OperationQueue getInitOperationQueue()
          Gets the init-operations
 OperationQueue getTodoOperationQueue()
          Gets the todo-operations
 void load(java.util.HashMap hm)
          Loads the values of this feedback with the values from the delivered HashMap-representation
 java.util.HashMap save()
          Converts all feedback-values in a HashMap-representation for saving-purposes
 void setEvaluator(Evaluator e)
          Sets the Evaluator
 void setInitOperationQueue(OperationQueue oq)
          Sets the init-operations
 void setTodoOperationQueue(OperationQueue oq)
          Sets the todo-operations
 void switchTo(SimpleFeedback newFeedback, boolean update)
          Switches to an other feedback-type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

feedbackGenerator

public static FeedbackGenerator feedbackGenerator

MAX_TRIES

public static final int MAX_TRIES
Defines the amount of the maximal tries for incorrect operations.

See Also:
Constant Field Values
Constructor Detail

SimpleFeedback

public SimpleFeedback(FeedbackExercise exercise)
Creates a SimpleFeedback

Parameters:
exercise - FeedbackExercise
Method Detail

getFeedbackGenerator

public FeedbackGenerator getFeedbackGenerator()
Gets the FeedbackGenerator

Returns:
FeedbackGenerator

setEvaluator

public void setEvaluator(Evaluator e)
Sets the Evaluator

Parameters:
e - Evaluator (NormalEvaluator or FaultEvaluator)
See Also:
NormalEvaluator, FaultEvaluator

getEvaluator

public Evaluator getEvaluator()
Gets the Evaluator

Returns:
Evaluator

displayLoadingMessage

public void displayLoadingMessage()
This method will be called, when a new exercise is start loading.


exerciseUpdate

public void exerciseUpdate(ExerciseUpdateEvent e)
Description copied from interface: ExerciseUpdateListener
Invoked when an Event occures

Specified by:
exerciseUpdate in interface ExerciseUpdateListener
Parameters:
e - The event

setTodoOperationQueue

public void setTodoOperationQueue(OperationQueue oq)
Sets the todo-operations

Parameters:
oq - todo-operations

getTodoOperationQueue

public OperationQueue getTodoOperationQueue()
Gets the todo-operations

Returns:
todo-operations

setInitOperationQueue

public void setInitOperationQueue(OperationQueue oq)
Sets the init-operations

Parameters:
oq - init-operations

getInitOperationQueue

public OperationQueue getInitOperationQueue()
Gets the init-operations

Returns:
init-operations

exerciseFinished

public boolean exerciseFinished()
Returns if the exercise was finished.

Returns:
true, if exercise finished, false otherwise

getFeedbackTypeID

public int getFeedbackTypeID()
Returns the FeedbackTypeID

Returns:
feedback-type-ID
See Also:
FeedbackSelector

save

public java.util.HashMap save()
Converts all feedback-values in a HashMap-representation for saving-purposes

Returns:
HashMap-representation

load

public void load(java.util.HashMap hm)
Loads the values of this feedback with the values from the delivered HashMap-representation

Parameters:
hm - HashMap-representation

switchTo

public void switchTo(SimpleFeedback newFeedback,
                     boolean update)
Switches to an other feedback-type

Parameters:
newFeedback - SimpleFeedback
update - true, to generate a jump-message with delta=0 which has the effect, that all data-structures are updated, false otherwise