java.lang.Object
ai.tutor.cab302exceptionalhandlers.model.AnswerOption

public class AnswerOption extends Object
Represents an answer option to a quiz question.

All variables here once set, are immutable.

Author:
Joshua M.
See Also:
  • 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 0
      questionNumber - The question number within the quiz, must be greater than 0
      option - The option of the answer
      value - The value of the answer
      isAnswer - 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

      public String getOption()
    • getValue

      public String getValue()
    • getIsAnswer

      public boolean getIsAnswer()