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:
Comments are closed.