Question: a. Write an application that creates a quiz. The quiz should contain at least five questions about a hobby, popular music, astronomy, or any other

a. Write an application that creates a quiz. The quiz should contain at least five questions about a hobby, popular music, astronomy, or any other personal interest. Each question should be a multiple-choice question with at least four answer options. When the user answers the question correctly, display a congratulatory message. If the user responds to a question incorrectly, display an appropriate message as well as the correct answer. At the end of the quiz, display the number of correct and incorrect answers, and the percentage of correct answers. Save the file as Quiz.java.
b. Modify the Quiz application so that the user is presented with each question continually until it is answered correctly. Remove the calculation for percentage of correct answers—all users will have 100% correct by the time they complete the application. Save the file as Quiz2.java.

Step by Step Solution

3.41 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a import javaxswing public class Quiz public static void main String args int answer totalAsked 0 correct 0 String entry String q1 Who is buried in Grants Tomb String q2 Who wrote Beethovens 5th Symph... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!