tomp.quiz
Class MultipleChoiceQuestion

java.lang.Object
  extended bytomp.quiz.AbstractQuestion
      extended bytomp.quiz.MultipleChoiceQuestion
All Implemented Interfaces:
Question
Direct Known Subclasses:
CheckGroupQuestion, RadioGroupQuestion

public abstract class MultipleChoiceQuestion
extends AbstractQuestion


Field Summary
protected  int highestRight
           
protected  java.util.BitSet right
           
 
Fields inherited from class tomp.quiz.AbstractQuestion
id, points
 
Constructor Summary
MultipleChoiceQuestion(java.lang.String id)
           
 
Method Summary
 java.lang.String getMyParameter(javax.servlet.http.HttpServletRequest req)
           
 Answer checkAnswer(java.lang.String answered)
           
 boolean isAnswerCorrectAt(int at)
           
 void setAnswerCorrectAt(int at)
           
 java.lang.String toString()
           
 
Methods inherited from class tomp.quiz.AbstractQuestion
getId, getPoints, checkAnswer, setPoints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

right

protected java.util.BitSet right

highestRight

protected int highestRight
Constructor Detail

MultipleChoiceQuestion

public MultipleChoiceQuestion(java.lang.String id)
Method Detail

setAnswerCorrectAt

public void setAnswerCorrectAt(int at)

isAnswerCorrectAt

public boolean isAnswerCorrectAt(int at)

checkAnswer

public Answer checkAnswer(java.lang.String answered)
Specified by:
checkAnswer in interface Question
Specified by:
checkAnswer in class AbstractQuestion

getMyParameter

public java.lang.String getMyParameter(javax.servlet.http.HttpServletRequest req)
Overrides:
getMyParameter in class AbstractQuestion

toString

public java.lang.String toString()
Overrides:
toString in class AbstractQuestion