Class AnswerOption
java.lang.Object
ai.tutor.cab302exceptionalhandlers.model.AnswerOption
Represents an answer option to a quiz question.
All variables here once set, are immutable.
- Author:
- Joshua M.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAnswerOption
(int messageId, int questionNumber, String option, String value, boolean isAnswer) Constructs a AnswerOption object. -
Method Summary
-
Constructor Details
-
AnswerOption
public AnswerOption(int messageId, int questionNumber, String option, String value, boolean isAnswer) throws IllegalArgumentException Constructs a AnswerOption object.- Parameters:
messageId
- The message ID that this answer belongs to, must be greater than 0questionNumber
- The question number within the quiz, must be greater than 0option
- The option of the answervalue
- The value of the answerisAnswer
- Whether this answer option is the correct answer to a quiz question or not- Throws:
IllegalArgumentException
- if any of the parameters are invalid
-
-
Method Details
-
getMessageId
public int getMessageId() -
getQuestionNumber
public int getQuestionNumber() -
getOption
-
getValue
-
getIsAnswer
public boolean getIsAnswer()
-