Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a program with a GUI. The GUI should be an interface to give a quiz. There should be a class called Question. This class
Create a program with a GUI. The GUI should be an interface to give a quiz.
There should be a class called Question. This class should maintain the question, possible answers, and which answer is the correct choice.
There should be a class called Quiz which has a list of Question Objects. There should be a Add method which adds a Question Object to the Quiz. The data for the question will be read from a file which is provided A method called GiveQuiz which presents the question to the user in a text area component. The answer choices should be radio buttons. The Quiz will keep track of the number of question the user gets correct. Quiz should provide random question from the list of After the questions it should display the user grade in a message dialog. There will need to be a button to start the quiz, and a button to submit the answer the user selects. The submit button should not be available until the quiz starts. The start button should be disabled when the quiz starts and reenabled when the quiz is over.
The GUI part of this is provided. You need to create the relationship between the Quiz and Question classes. Then have the GUI use the Quiz object to keep the GUI updated.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started