org.problets.student
Class AnswerList

java.lang.Object
  extended by org.problets.student.AnswerList

public class AnswerList
extends java.lang.Object

To hold the current answer

Author:
Amruth Kumar

Constructor Summary
AnswerList()
           
 
Method Summary
 void addtoAnswer(CodeSegmentAttempt codeSegmentAttempt)
           
 void addtoAnswer(ErrorLine inErrorLine)
          This will be the method through which CodeView will communicate with StudentModel to register the user's answer to the current problem.
 void addtoAnswer(ExpressionViewStep step)
           
 void addtoAnswer(LineOutput inOutput)
          This method is used to record "No Output" specified by the user for the current code.
 void addtoAnswer(LineOutput inOutput, java.util.Vector actualAnswer)
          This method is used to record the output specified by the user for the current code.
 void addtoAnswer(java.util.Vector dataTrace)
           
 java.util.Vector getAnswers()
           
 java.util.Vector getAnswersForLine(int lineNumber)
          Method to return a vector of all the errors checked for this line
 java.lang.Object getLastAnswer()
           
 int getNumberEntries()
           
 boolean isProblemAttempted()
           
static void main(java.lang.String[] args)
           
 void undoAllAnswers()
           
 void undoLastAnswer()
           
 void updateAnswersForLine(int lineNumber, java.util.Vector newAnswers, java.util.Vector actualAnswer)
          Method to update the output for a line
 void verifyOutputCorrectness(java.util.Vector actualAnswer)
          If the user manipulates the output of a program on the OutputStreamView panel this method is used to verify the correctness of the changes for Error-Flagging purposes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnswerList

public AnswerList()
Method Detail

getAnswersForLine

public java.util.Vector getAnswersForLine(int lineNumber)
Method to return a vector of all the errors checked for this line

Parameters:
line - number, an integer
Returns:
Vector of ErrorLine objects for this line

getLastAnswer

public java.lang.Object getLastAnswer()

getAnswers

public java.util.Vector getAnswers()

getNumberEntries

public int getNumberEntries()

isProblemAttempted

public boolean isProblemAttempted()

addtoAnswer

public void addtoAnswer(ErrorLine inErrorLine)
This will be the method through which CodeView will communicate with StudentModel to register the user's answer to the current problem. If the user has selected a new error for the problem, log it; else, remove the previously selected error from the answer log.


addtoAnswer

public void addtoAnswer(LineOutput inOutput)
This method is used to record "No Output" specified by the user for the current code.


addtoAnswer

public void addtoAnswer(LineOutput inOutput,
                        java.util.Vector actualAnswer)
This method is used to record the output specified by the user for the current code.


addtoAnswer

public void addtoAnswer(ExpressionViewStep step)

addtoAnswer

public void addtoAnswer(java.util.Vector dataTrace)

addtoAnswer

public void addtoAnswer(CodeSegmentAttempt codeSegmentAttempt)

undoLastAnswer

public void undoLastAnswer()

undoAllAnswers

public void undoAllAnswers()

updateAnswersForLine

public void updateAnswersForLine(int lineNumber,
                                 java.util.Vector newAnswers,
                                 java.util.Vector actualAnswer)
Method to update the output for a line


verifyOutputCorrectness

public void verifyOutputCorrectness(java.util.Vector actualAnswer)
If the user manipulates the output of a program on the OutputStreamView panel this method is used to verify the correctness of the changes for Error-Flagging purposes


main

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