Reference no: EM13348
The program randomly generates the quiz question one by one from a set of available questions on general knowledge and corresponding answers including the correct answers. To do the quiz, the user sets the timer off, answers the quiz question one by one. Upon clicking the ‘Stop' button, the program automatically marks the quiz and displays your points and the time taken to complete the quiz.
The GUI components beginning from the top to the bottom include:
• A top panel that contains a label for the title of the application.
• A middle panel with the BorderLayout that is divided into five areas:
The GUI
- On the north area, a panel holds a label to display the actual time when the quiz starts. (Initially it is set as "Display Time")
- On the west area, it is a panel held labels and buttons to represent the answers of a quiz question. Initially, the text on these answer buttons are blank. Once the ‘Start' button is clicked, the possible answers will be displayed on the buttons.
- On the center area, it is a text area to display the question generated randomly.
- On the east area, it will display the quiz result; and
- On the south area, it accommodates five buttons - Start, Next, Stop, Clear and Exit button.