org.problets.lib.conceptmap.student
Class StudentAnswer

java.lang.Object
  extended by org.problets.lib.conceptmap.student.StudentAnswer

public class StudentAnswer
extends java.lang.Object

Class used to which keeps track of the student's eachactions. It stores the source and target nodes, action type, link correctness and action time.


Field Summary
static int ADD_LINK
          Constant which denotes an add-link student action
static int DELETE_LINK
          Constant which denotes a delete-link student action
 
Constructor Summary
StudentAnswer(java.lang.String inFromNode, java.lang.String inToNode, int inActionType, boolean inCorrectLink, long inTime)
          Creats a StudentAttempt object using the names of the two nodes, the action type and the correctness of the new link as arguments.
 
Method Summary
 int getActionType()
          Returns the type of the action the student performed (add/delete a link).
 java.lang.String getFromNode()
          Returns the name of the source node for the new/disconnected link.
 java.lang.String getToNode()
          Returns the name of the target node for the new/disconnected link.
 boolean isCorrect()
          Returns true if the new link is correct, false otherwise.
static void main(java.lang.String[] args)
           
 java.lang.String toString()
          Returns the student answer in string format.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD_LINK

public static final int ADD_LINK
Constant which denotes an add-link student action

See Also:
Constant Field Values

DELETE_LINK

public static final int DELETE_LINK
Constant which denotes a delete-link student action

See Also:
Constant Field Values
Constructor Detail

StudentAnswer

public StudentAnswer(java.lang.String inFromNode,
                     java.lang.String inToNode,
                     int inActionType,
                     boolean inCorrectLink,
                     long inTime)
Creats a StudentAttempt object using the names of the two nodes, the action type and the correctness of the new link as arguments.

Method Detail

getFromNode

public java.lang.String getFromNode()
Returns the name of the source node for the new/disconnected link.

Returns:
the name of the source node

getToNode

public java.lang.String getToNode()
Returns the name of the target node for the new/disconnected link.

Returns:
the name of the target node

getActionType

public int getActionType()
Returns the type of the action the student performed (add/delete a link).

Returns:
the type of the action the student performed.

isCorrect

public boolean isCorrect()
Returns true if the new link is correct, false otherwise.

Returns:
true if the new link is correct, false otherwise

toString

public java.lang.String toString()
Returns the student answer in string format.

Overrides:
toString in class java.lang.Object
Returns:
the student answer

main

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