Package SolvishR

Class TimedExam

java.lang.Object
SolvishR.Exam
SolvishR.TimedExam

public class TimedExam extends Exam
The SolvishR.TimedExam class represents a timed exam, extending the abstract SolvishR.Exam class. It allows the user to run the exam with a specified time limit, displaying questions, receiving answers, and showing results. This class can be instantiated with a pre-defined list of questions or an empty list.
Version:
1.0
Author:
Adib Sakhawat
  • Constructor Details

    • TimedExam

      public TimedExam(List<Question> questions, int timeLimit)
      Constructs a SolvishR.TimedExam with a pre-defined list of questions and a time limit.
      Parameters:
      questions - The list of questions for the exam.
      timeLimit - The time limit for the exam in minutes.
    • TimedExam

      public TimedExam(int timeLimit)
      Constructs a SolvishR.TimedExam with a time limit and an empty list of questions.
      Parameters:
      timeLimit - The time limit for the exam in minutes.
  • Method Details

    • runExam

      public void runExam()
      Runs the timed exam by displaying questions, receiving answers within the time limit, and showing results.
      Specified by:
      runExam in class Exam