AHA
Class Question

java.lang.Object
  |
  +--AHA.Question

public class Question
extends java.lang.Object

Question is an object class that represents questions and answers in multiple-choice tests.


Constructor Summary
Question()
          The default (and only) constructor initializes the internal structure of a "Question" object.
 
Method Summary
 void addBadAnswer(java.lang.String s)
          Add an incorrect answer to the list of incorrect answers.
 void addFeedback(java.lang.String s)
          Add feedback to the question that was last added (correct or incorrect).
 void addGoodAnswer(java.lang.String s)
          Add a correct answer to the list of correct answers.
 void concatBadAnswer(java.lang.String s)
          Add text to the last incorrect answer.
 void concatFeedback(java.lang.String s)
          Add text to the last feedback.
 void concatGoodAnswer(java.lang.String s)
          Add text to the last correct answer.
 void concatQuestion(java.lang.String s)
          Add text to a question.
 int getAnswersToShow()
          Return the answers to show.
 java.util.Vector getBadAnswers()
          Return the incorrect answers.
 java.util.Vector getBadFeedback()
          Return feedback on the incorrect answers.
 java.util.Vector getGoodAnswers()
          Return the correct answers.
 java.util.Vector getGoodFeedback()
          Return feedback on the correct answers.
 java.lang.String getQuestion()
          Return the question.
 int getRightToShow()
          Return the number of correct answers to show.
 void setAnswersToShow(int i)
          Set the answers to show.
 void setQuestion(java.lang.String s)
          Set the question text.
 void setRightToShow(int i)
          Set the number of correct answers to show.
 void setSize(int NbAnswers, int NbCorrect)
          Set the number of answers and the number of correct answers.
 void verify()
          Verify that the number of actual correct and incorrect answers match the numbers that were set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Question

public Question()
The default (and only) constructor initializes the internal structure of a "Question" object.
Method Detail

getQuestion

public java.lang.String getQuestion()
Return the question.

setQuestion

public void setQuestion(java.lang.String s)
Set the question text.

concatQuestion

public void concatQuestion(java.lang.String s)
Add text to a question.

getRightToShow

public int getRightToShow()
Return the number of correct answers to show.

setRightToShow

public void setRightToShow(int i)
Set the number of correct answers to show.

getAnswersToShow

public int getAnswersToShow()
Return the answers to show.

setAnswersToShow

public void setAnswersToShow(int i)
Set the answers to show.

getBadAnswers

public java.util.Vector getBadAnswers()
Return the incorrect answers.

addBadAnswer

public void addBadAnswer(java.lang.String s)
Add an incorrect answer to the list of incorrect answers.

concatBadAnswer

public void concatBadAnswer(java.lang.String s)
Add text to the last incorrect answer.

getGoodAnswers

public java.util.Vector getGoodAnswers()
Return the correct answers.

addGoodAnswer

public void addGoodAnswer(java.lang.String s)
Add a correct answer to the list of correct answers.

concatGoodAnswer

public void concatGoodAnswer(java.lang.String s)
Add text to the last correct answer.

getGoodFeedback

public java.util.Vector getGoodFeedback()
Return feedback on the correct answers.

getBadFeedback

public java.util.Vector getBadFeedback()
Return feedback on the incorrect answers.

addFeedback

public void addFeedback(java.lang.String s)
Add feedback to the question that was last added (correct or incorrect).

concatFeedback

public void concatFeedback(java.lang.String s)
Add text to the last feedback.

setSize

public void setSize(int NbAnswers,
                    int NbCorrect)
Set the number of answers and the number of correct answers.

verify

public void verify()
            throws AhaException
Verify that the number of actual correct and incorrect answers match the numbers that were set.
Throws:
AhaException - If the numbers don't match the existing answers.