Package SolvishR
Class ExamSaver
java.lang.Object
SolvishR.ExamSaver
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks and creates the folder and file for storing exam history data.voidDeletes the exam history file.static ExamSaverGets the singleton instance of the SolvishR.ExamSaver.voidSaves exam results to the exam history file.voidShows the exam history by reading and displaying data from the exam history file.
-
Field Details
-
drive
The drive where exam history data is stored.- See Also:
-
folder
The folder where exam history data is stored.- See Also:
-
file
The file where exam history data is stored.- See Also:
-
-
Method Details
-
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
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.
-