mauda.feedback
Class FaultEvaluator

java.lang.Object
  extended by mauda.feedback.Evaluator
      extended by mauda.feedback.FaultEvaluator

public class FaultEvaluator
extends Evaluator

The automatic evaluator of FaultMode-exercises

Author:
Markus Krebs

Field Summary
static int CORRECT_MODE
          ID that defines that the student has found the first failure, and selected the correct failure-type, and is currently specifying what the correct suboperation is.
static int FALSE_CORRECT
          ID that defines that the student thought that a correct operation was incorrect.
static int FALSE_FAILURE_TYPE_SELECTED
          ID that defines that the student selected the false type of the failure.
static int FALSE_NOT_FIRST
          ID that defines that the student found a failure, but it was not the first failure.
static int FIRST_FAILURE_FOUND
          ID that defines that the student found the first failure
static int GIVE_UP
          ID that defines that the student given up the exercise,
static int SEARCH_FAILURE
          ID that defines that the student is in search-the-failure-mode
 
Constructor Summary
FaultEvaluator()
          Creates a FaultEvaluator
 
Method Summary
 void evaluate(OperationRecorder or)
          Evaluates a total processed exercise
 java.lang.String getHTMLMessage()
          Gets a string-html-representation of the errors made, with diverse statistics.
 int getState()
          Gets the current state the student reached
 void load(java.util.HashMap hm)
          Loads this evaluator from a HashMap-representation, that was readed from a xml-file.
 void log(FeedbackObject fo)
          Logs an FeedbackObject the evaluator needs to evaluate a processed exercise.
 void log(int id)
          Logs specific states that are reached by the student in FaultMode.
 void postProcessing(java.util.Vector v)
          Calculates the maximal reachable points.
 java.util.HashMap save()
          Converts the results of the evaluator in a HashMap-representation for saving-purposes.
 void setState(int id)
           
 
Methods inherited from class mauda.feedback.Evaluator
getScoreString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEARCH_FAILURE

public static final int SEARCH_FAILURE
ID that defines that the student is in search-the-failure-mode

See Also:
Constant Field Values

FIRST_FAILURE_FOUND

public static final int FIRST_FAILURE_FOUND
ID that defines that the student found the first failure

See Also:
Constant Field Values

FALSE_CORRECT

public static final int FALSE_CORRECT
ID that defines that the student thought that a correct operation was incorrect.

See Also:
Constant Field Values

FALSE_NOT_FIRST

public static final int FALSE_NOT_FIRST
ID that defines that the student found a failure, but it was not the first failure.

See Also:
Constant Field Values

FALSE_FAILURE_TYPE_SELECTED

public static final int FALSE_FAILURE_TYPE_SELECTED
ID that defines that the student selected the false type of the failure.

See Also:
Constant Field Values

CORRECT_MODE

public static final int CORRECT_MODE
ID that defines that the student has found the first failure, and selected the correct failure-type, and is currently specifying what the correct suboperation is.

See Also:
Constant Field Values

GIVE_UP

public static final int GIVE_UP
ID that defines that the student given up the exercise,

See Also:
Constant Field Values
Constructor Detail

FaultEvaluator

public FaultEvaluator()
Creates a FaultEvaluator

Method Detail

postProcessing

public void postProcessing(java.util.Vector v)
Calculates the maximal reachable points. This must be calculated before the student works on the exercise.

Overrides:
postProcessing in class Evaluator
Parameters:
v - Vector of the exercise-todo-operations
See Also:
Evaluator.postProcessing(java.util.Vector)

evaluate

public void evaluate(OperationRecorder or)
Description copied from class: Evaluator
Evaluates a total processed exercise

Overrides:
evaluate in class Evaluator
Parameters:
or - OperationRecorder

log

public void log(FeedbackObject fo)
Description copied from class: Evaluator
Logs an FeedbackObject the evaluator needs to evaluate a processed exercise. Mostly this is a FeedbackObject, which contains an error that was made.

Overrides:
log in class Evaluator
Parameters:
fo - FeedbackObject

log

public void log(int id)
Description copied from class: Evaluator
Logs specific states that are reached by the student in FaultMode. E.g.: False chosen type of failure

Overrides:
log in class Evaluator
Parameters:
id - FaultEvaluator-ID
See Also:
SEARCH_FAILURE, FIRST_FAILURE_FOUND, FALSE_CORRECT, FALSE_NOT_FIRST, FALSE_FAILURE_TYPE_SELECTED, CORRECT_MODE

getHTMLMessage

public java.lang.String getHTMLMessage()
Description copied from class: Evaluator
Gets a string-html-representation of the errors made, with diverse statistics.

Overrides:
getHTMLMessage in class Evaluator
Returns:
string-html-represenation of the errors made

getState

public int getState()
Gets the current state the student reached

Returns:
state-id
See Also:
SEARCH_FAILURE, FIRST_FAILURE_FOUND, FALSE_CORRECT, FALSE_NOT_FIRST, FALSE_FAILURE_TYPE_SELECTED, CORRECT_MODE

setState

public void setState(int id)

save

public java.util.HashMap save()
Description copied from class: Evaluator
Converts the results of the evaluator in a HashMap-representation for saving-purposes.

Overrides:
save in class Evaluator
Returns:
HashMap-representation of the results

load

public void load(java.util.HashMap hm)
Description copied from class: Evaluator
Loads this evaluator from a HashMap-representation, that was readed from a xml-file.

Overrides:
load in class Evaluator
Parameters:
hm - HashMap-representation of the results