Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a java applicaiton that creates a quiz application that asks the user 5 multiple choice questions, prompts for an answer, then advises the user

Create a java applicaiton that creates a quiz application that asks the user 5 multiple choice questions, prompts for an answer, then advises the user if their answer is correct or incorrect. If the user provides the wrong answer the application should provide the user with the correct answer. After the user completes the 5 questions the application should provide the user with a summary of their results including the number of correct and incorrect answers as well as their score (percent). Your application must contain and use at least two custom methods in addition to the main method. Quiz questions and answers must be read from a file named quiz.txt that is placed in the same folder as the java file being executed. The quiz.txt file should contain 10 question & answer combinations. The 5 questions asked should be randomly selected from the questions in this file. You can choose to structure the contents of your quiz.txt file in any way you wish but keep in mind that it should be easy to add additional questions. (It is not part of this exercise, but you should consider how the file should be structured so that questions can be programmatically added and removed.) For this exercise the questions can be on any topic (ie. state capitals) but your application should be built in such a way that the subject of the questions is irrelevant

Here is a sample question:

What is the state capital of Connecticut:

A. Bridgeport

B. Bristol

C. Hartford

D. Norwalk

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions