Display one question at a time

Assignment Help Computer Engineering
Reference no: EM132194547

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 and A 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

Student's 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_Array.txt" for questions and "A_Array.txt" 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.

Reference no: EM132194547

Questions Cloud

How far does the block move down the incline : A 13-kg block (M) is released from rest on a frictionless incline that makes an angle of 20°, as shown in the figure below. Below the block is a spring.
Who is allowed to backup data : Who is allowed to backup data? and restore data?
Ask the user for their name and street address : Write a C++ program that will ask the user for their name and street address.
Evaluate the job analysis procedures : HRMG 3001: Human Resource Management - Which type of validation would you use? Why? What are the differences between content and criterion-related validity
Display one question at a time : . 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.
What is the kinetic energy : The point of this question is to compare rest energy and kinetic energy at high speeds. An alpha particle (a helium nucleus) is moving at a speed of 0.9981.
Write a main that sets an unsigned to some value : Write a main that sets an unsigned to some value, passes the address of the unsigned to bit, and then outputs the 32 bits of the unsigned, high-order bit first.
What direction should the plane head to fly straight : An airplane has a cruising speed (speed of plane with respect to the air) of 559 mph. The wind is blowing at 56 mph 15° north of east.
How fast was the ball going : Dr. Matthew Mench releases a bowling ball with an initial velocity of 3.0 m/s; the ball slows down with a constant acceleration of -0.27 m/s2.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Develop a complete disaster recovery plan

Using an organization of your choice: Develop a Complete Disaster Recovery Plan to be submitted to the executive board of your company.

  Some it department policies are designed to prevent

some it department policies are designed to prevent behaviors by it staff. while some depend upon the employee

  The plaintiff while driving a pickup manufactured by the

the plaintiff while driving a pickup manufactured by the defendant was struck in the rear by another motor vehicle.

  To begin to combine and demonstrate skills in drawing tools

to begin to combine and demonstrate skills in drawing tools tweens working with text and telling a storyassignment

  Evaluate air properties at an average temperature

A simple solar collector is built by placing a 5-cmdiameter clear plastic tube around a garden hose whose outer diameter is 1.6 cm.

  How entries move up the skip list during insertions

Visualize how entries move up the skip list during insertions and are linked out of the skip list during removals.

  Discuss memory reference instruction

Assume you are designing a CPU that is to have a 20-bit address bus with each memory location containing 16 bits. A base page is defined that has 1024 location.

  Design a structure in c that contains data to model a state

Design a structure in C that contains data to model a state capital and write several functions that process and act on that data.

  What are the three categories of entities

What are the three categories of entities affected by HIPAA Medical Privacy Regulations? What would business associates of covered entities consist.

  Design of a mass transit simulation system

OMSCS 6310 – Software Architecture & Design - You are continuing your work as part of a project team that has been directed to help improve the design

  Find the lowest five possible frequencies

A signal was acquired at 200 Hz and the spectrum showed a peak at 80 Hz. No anti- Max pts aliasing filter was used.

  What function is this circuit performing

For the circuit shown in Fig. P3.2.1: (a) Find H(f).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd