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

public class QuizQuestion extends Object
Represents a singular quiz question.

This class encapsulates the properties of a quiz question, each quiz question must have a unique message ID, a question number, and the question content itself.

Author:
Joshua M.
See Also:
  • Constructor Details

    • QuizQuestion

      public QuizQuestion(int messageId, int number, String question) throws IllegalArgumentException
      Constructs a QuizQuestion object.
      Parameters:
      messageId - The message ID that this question belongs to, must be greater than 0
      number - The question number within the quiz, must be greater than 0
      question - The content of the question, must not be null or empty and must be between 1 and 100 characters
      Throws:
      IllegalArgumentException - if any of the parameters are invalid
  • Method Details

    • getMessageId

      public int getMessageId()
    • getNumber

      public int getNumber()
    • getQuestion

      public String getQuestion()