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

public class Quiz extends Object
Represents a Quiz

Quizzes must have a name and difficulty. Within a quiz, there will be multiple options for the student to choose from. See QuizQuestion

Author:
Joshua M.
See Also:
  • Constructor Details

    • Quiz

      public Quiz(int messageId, String name, String difficulty) throws IllegalArgumentException
      Constructor for a Quiz object
      Parameters:
      messageId - The message id that this quiz belongs to, must be greater than 0
      name - The name of the quiz, must not be null or empty and must be less than 50 characters
      difficulty - The difficulty of the quiz, must not be null or empty and must be less than 25 characters
      Throws:
      IllegalArgumentException - if any of the parameters are invalid
  • Method Details

    • getMessageId

      public int getMessageId()
    • getName

      public String getName()
    • getDifficulty

      public String getDifficulty()