Question: You are asked to write a Java program for the electronic quiz system. The question will be displayed one by one. The user will enter

 You are asked to write a Java program for the electronic

quiz system. The question will be displayed one by one. The user

You are asked to write a Java program for the electronic quiz system. The question will be displayed one by one. The user will enter his/her answer, which is either A, B, C, or D. The system will then immediately check the answer and produce the result. After attempting all questions, the total score will be displayed. A sample run of the program is shown as below (Green text refers to user input): Welcome to Astrology Test Question 1: Which zodiac sign looks like a pair of fish? A: Pisces B: Aquarius C: Libra D: Virgo Enter your answer (A, B, C, or D): A Correct. Question 2: Which of the following zodiac signs is called "the bull"? A: Aries B: Gemini C. Leo D: Scorpio Enter your answer (A, B, C, or D): B Incorrect. The correct answer is C Question 3: How many signs are in the zodiac? A: 6 B: 12 C: 14 D: 24 Requirement: 1. The output of the program MUST EXACTLY the same as the above sample run of in character level. 2. You must create a class Question, which stores information of a question: the question text, the options, and the correct answer; 3. You must create a class Asgno2, which has the main method to run the program. 4. You must store all questions in an array and make use of this array throughout the program. 5. You are NOT allowed to use other build-in data structures/classes like ArrayList, Set, HashMap, etc. Input File Format: All questions are stored in the file AstrologyQuiz, txt". The first line of the file indicates the number of questions in the file. Next, for every five consecutive lines, the first line refers to the question text, while the second to fifth lines refer to the four options. The true answer starts with a "*", which should NOT be displayed in the system. The following shows a sample content of the file Astrology Quiz.txt. 5 Which zodiac sign looks like a pair of fish? *Pisces Aquarius Libra Virgo Which of the following zodiac signs is called "the bull"? Aries Gemini *Leo Scorpio How many signs are in the zodiac? 1st Question 2nd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!