Question: Write a C++ documented program to perform the role of a quiz maker. The program should randomly display True/False questions, record student's answers, keep track

Write a C++ documented program to perform the role of a quiz maker.

The program should randomly display True/False questions, record student's answers, keep track of the timing, and calculate the final score out of 10.

The program should work as follows:

1. Prompt the student to enter their First name and Last name (both of type string), and ID (a number of 6 digits)

2. Validate the entered ID, if the length of ID is not 6 digits, stay at step 2 and prompt the user to re-enter the correct ID. After 3 failed attempts, exit the program. If the student entered a valid name and ID go to step 3.

3. Randomly pick ten questions with their answers form the Q and A arrays.

4. Display one question at a time. Get the answer, then move to the next question.

5. Do not accept answers other than true or false (T or F should be fine too). The answers should not be case sensitive.

6. When the user is done with the quiz, print out a report (On screen) with the below information in it: First name and Last name Score Elapsed time Students answers and the correct answer.

7. Prompt the student to enter Q to exit the program, or to enter S to clear the screen and start a new quiz for another student.

Requirements o The program skeleton will include two string arrays Q for questions and A for answers, that you will use to pick the quiz questions from.

o In each quiz, your program should display ten unique random questions (no repeated questions). o Users have 10 minutes to complete the quiz, after 10 minutes the program should automatically terminate the quiz, and report the outputs to the screen.

o All questions have the same weight. 10 questions for 10 points.

Code optimization (breaking your code into functions): Modify your code to include the following functions:

1) bool Validate_ID (int ID): to validate the length of the ID, if 6 returns true otherwise returns false.

2) bool Unique_Question (int questionNumber): to check if the question already was used before in the quiz or not, if the question was used before returns false, otherwise returns true.

Extra Credits:

o (10 points) By default the quiz maker, will display 10 questions for students, each question weight 1 point. Give an option for students to choose the number of questions in the quiz, options will be 10 questions Or 20 questions before starting the exam:

If the student chose 10 questions, then each question weight 1 point

If the student chose 20 questions, then each question weight 0.5 point

o (20 points) Modify your program so instead of having the questions and answers in your code, questions can be read from a text file name it TestBank.txt and answers from a text file Answers.txt, and dynamically during runtime assign the questions to Q array and answers to A array.

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!