algoanim.interactionsupport
Class TrueFalseQuestion
java.lang.Object
algoanim.interactionsupport.InteractiveElement
algoanim.interactionsupport.InteractiveQuestion
algoanim.interactionsupport.TrueFalseQuestion
public class TrueFalseQuestion
- extends InteractiveQuestion
|
Method Summary |
boolean |
getAnswerStatus()
returns the answer status, determining whether the question
statement was correct (=true) or not (=false) |
java.lang.String |
getFeedbackForOption(boolean userChoice)
return the didactical feedback for the user answer |
void |
setAnswerStatus(boolean answerStatus)
sets the answer status to the value passed in |
void |
setFeedbackForAnswer(boolean answerOption,
java.lang.String text)
assigns a text to be shown if the question was answered
in a certain way, i.e., the feedback to be given for the
answer "true" if the answerOption parameter is
true, and the feedback for "false" if the parameter
is false. |
void |
setFeedbackForCorrectAnswer(java.lang.String text)
assigns a text to be shown if the user answered "true" |
void |
setFeedbackForIncorrectAnswer(java.lang.String text)
assigns a text to be shown if the user answered "true" |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
answerIsCorrect
protected boolean answerIsCorrect
TrueFalseQuestion
public TrueFalseQuestion(Language lang,
java.lang.String id)
getAnswerStatus
public boolean getAnswerStatus()
- returns the answer status, determining whether the question
statement was correct (=true) or not (=false)
- Returns:
- the answer status; true for a correct and
false for an incorrect statement
getFeedbackForOption
public java.lang.String getFeedbackForOption(boolean userChoice)
- return the didactical feedback for the user answer
- Parameters:
userChoice - if true, the returned String will
be the feedback for the user's choice of the "true" button; else,
it will the feedback for a chosen "false" button.
- Returns:
- the didactical feedback associated with the given
user answer.
setAnswerStatus
public void setAnswerStatus(boolean answerStatus)
- sets the answer status to the value passed in
- Parameters:
answerStatus - if true, the question statement
was correct, else it was incorrect
setFeedbackForCorrectAnswer
public void setFeedbackForCorrectAnswer(java.lang.String text)
- assigns a text to be shown if the user answered "true"
- Parameters:
text - the text to be shown if the user selected the
answer option "true"
setFeedbackForIncorrectAnswer
public void setFeedbackForIncorrectAnswer(java.lang.String text)
- assigns a text to be shown if the user answered "true"
- Parameters:
text - the text to be shown if the user selected the
answer option "false"
setFeedbackForAnswer
public void setFeedbackForAnswer(boolean answerOption,
java.lang.String text)
- assigns a text to be shown if the question was answered
in a certain way, i.e., the feedback to be given for the
answer "true" if the answerOption parameter is
true, and the feedback for "false" if the parameter
is false.
- Parameters:
answerOption - determines if the feedback is for the
chosen answer type "true" or "false". Note that this is
not the same as for "correct" or "incorrect" -- the
answer option "true" will often be the incorrect choice.
The parameter thus describes the user's chosen answer,
not the correctness of that answer.text - the text to be shown if the user's answer was
incorrect