public class ChoiceAnswerFormat extends AnswerFormat
AnswerFormat.ChoiceAnswerStyle, AnswerFormat.DateAnswerStyle, AnswerFormat.NumberFormattingStyle, AnswerFormat.QuestionType, AnswerFormat.Type| Constructor and Description |
|---|
ChoiceAnswerFormat(AnswerFormat.ChoiceAnswerStyle answerStyle,
Choice... choices)
Creates an answer format with the specified answerStyle(single or multichoice) and collection
of choices.
|
| Modifier and Type | Method and Description |
|---|---|
Choice[] |
getChoices()
Returns a copy of the choice array
|
AnswerFormat.QuestionType |
getQuestionType()
Returns a multiple choice or single choice question type, which will decide which
StepBody to use to display this question. |
public ChoiceAnswerFormat(AnswerFormat.ChoiceAnswerStyle answerStyle, Choice... choices)
answerStyle - either MultipleChoice or SingleChoicechoices - an array of Choice objects, all of the same typepublic AnswerFormat.QuestionType getQuestionType()
StepBody to use to display this question.getQuestionType in class AnswerFormatpublic Choice[] getChoices()