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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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