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

  Questionbased on the confusion matrix belowcluster red

questionbased on the confusion matrix belowcluster red green purple black white blue total1 1 1 0 11 4 676 6932 27 89

  Problem on sql statement

Problem on  SQL statement

  Give pseudocode for a greedy solution to the word crush

The Word Crush puzzle gives you a collection of words wordbank and a target word goal and asks you to find the fewest words from word bank.

  Write an analysis of the skills and requirements

Write an analysis of the skills and requirements for a career in healthcare information technology, including a self-reflection of the skill development.

  Identify the fundamentals of public key infrastructure

Identify the fundamentals of public key infrastructure (PKI). Describe the manner in which your solution will protect the privacy of data transmitted.

  How does accessibility impact all users regardless

Which of the remaining three factors associated with semantic HTML is most important to semantic HTML, in your opinion?

  How windows will fit into proposed corporate environment

Write a 250- to 350-word paper discussing the key aspects of how Windows will fit into your proposed corporate environment. You must use at least one credible.

  To what does the expression dot pitch refer

To what does the expression dot pitch refer? What is a modem? Which are faster, download seeds or upload speeds?

  What are some conferences that cover your concentration

What are some conferences that cover your concentration? Select 3 journals or conferences from either above topic areas, and write a brief description of each.

  What do they use and how well do they use it

Pick a company that uses mobile computing. Investigate how it uses mobile computing/location marketing. Does your company have the following.

  Derive the characteristics of the crossbar network

Four 16-bit processors are connected to four 64K x 16 memory banks through a crossbar network. The processors can access 64K memory directly.

  Investigate the capabilities and limitations of kerberos

The Kerberos security model is a part of both the DCE and CORBA standard families. Investigate the capabilities and limitations of Kerberos.

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