Class Quiz

java.lang.Object
jadex.micro.quiz.model.Quiz

public class Quiz extends Object
The quiz data class.
  • Field Details

    • questions

      protected List<Question> questions
      The questions.
    • name

      protected String name
      The quiz name.
    • start

      protected long start
      The start time.
  • Constructor Details

    • Quiz

      public Quiz()
      Create a new quiz.
    • Quiz

      public Quiz(String name)
      Create a new quiz.
    • Quiz

      public Quiz(String name, List<Question> questions)
      Create a new quiz.
  • Method Details

    • getQuestions

      public List<Question> getQuestions()
      Returns:
      the questions
    • setQuestions

      public void setQuestions(List<Question> questions)
      Parameters:
      questions - the questions to set
    • getQuestion

      public Question getQuestion(int no)
      Get a question per index.
    • getNumberOfQuestions

      public int getNumberOfQuestions()
      Get the number of questions.
    • addQuestion

      public void addQuestion(Question q)
      Add a question.
    • getName

      public String getName()
      Returns:
      the name
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getStart

      public long getStart()
      Returns:
      the start
    • setStart

      public void setStart(long start)
      Parameters:
      start - the start to set