Package SolvishR

Class ExamSaver

java.lang.Object
SolvishR.ExamSaver

public class ExamSaver extends Object
The SolvishR.ExamSaver class is responsible for saving exam results, showing exam history, and deleting exam history records. It follows the Singleton pattern to ensure only one instance is created. The class uses file operations to manage exam history data.
Version:
1.0
Author:
Adib Sakhawat
  • Field Details

  • Method Details

    • getInstance

      public static ExamSaver getInstance()
      Gets the singleton instance of the SolvishR.ExamSaver.
      Returns:
      The singleton instance of the SolvishR.ExamSaver.
    • checkAndCreateFolder

      public void checkAndCreateFolder()
      Checks and creates the folder and file for storing exam history data.
    • saveExam

      public void saveExam(Exam e)
      Saves exam results to the exam history file.
      Parameters:
      e - The exam whose results need to be saved.
    • showHistory

      public void showHistory()
      Shows the exam history by reading and displaying data from the exam history file.
    • deleteHistory

      public void deleteHistory()
      Deletes the exam history file.