Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 scores out of 10. The program should work as follows: Prompt the student to enter their First name and Last name (both of type string), and ID (a number of 6 digits) 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. Randomly pick ten questions with their answers form the "Q_Array.txt" and "A_Array.txt" arrays. Display one question at a time. Get the answer then move to the next question. Do not accept answers other than true or false (T or F should be fine too). The answers should not be case sensitive. 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. 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 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. In each quiz, your program should display ten unique random questions (no repeated questions). Users have 10 minutes to complete the quiz, after 10 minutes the program should automatically terminates the quiz and report the outputs to the screen. All questions have the same weight. 10 questions for 10 points. Code optimization (breaking your code to functions): Modify your code to include the following functions: bool Validate_ID (int ID): to validate the length of the ID, if 6 returns true otherwise returns false. 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. Grading Rubric: Workable Program 35 Using Code Optimization (Functions) 15 Correct output 25 Using descriptive variables names 10 Comments/readability of program 15 Extra Credits: (15 points) By default the quiz maker, will display 10 questions for the student, each question weight 1 point. Give an option for student 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 (25 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.

Preferred bonus if possible! Needs to work for cpp.sh and win32 console application in visual studio.

Thanks!

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_2

Step: 3

blur-text-image_3

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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

List the causes of separation in an organisation.

Answered: 1 week ago

Question

Answered: 1 week ago

Answered: 1 week ago