This program creates multiple choice and True/False questions using the JOptionPane class as the GUI. The program asks for answers for a user to fill. The final score is returned after answering all questions. This program can be implemented in performing online exams or surveys.
There are four classes in this project.
- MultipleChoiceQuestion.java is a class file to manage multiple-choice questions.
- TrueFalseQuestion.java is a class file to manage true/false questions.
- Question.java is a parent class of the above two classes.
- QuestionDialog.java is a button-listener class.
- Quiz.java will include the main program.
You have to put your questions and answers in the file Quiz.java.