Starting Out With C++ From Control Structures Through Objects
Drivers Number Nine Visual Cortex
Snellen acuity is a poor indicator of an individual's chance of passing a number plate test, and it cannot be assumed that a driver with a visual acuity of 6/9 will meet the standard for driving. All drivers with 6/9 vision or less must be encouraged to self assess. That’s because it: a) seems so simple and, b) appears as though there are a number of ways to get this information. For example, on our Windows XP computer we have no fewer than eight WMI classes than include the acronymn ODBC somewhere in the class name. Surely one of those classes will return a list of installed drivers, right?
In this exercise we will use C++ arrays heavily and keep track of several arrays at the same time. C++ loops will also be used extensively to populate the array and to get values from the arrays. Demonstrated is also C++ conditional ternary operator.
Driver’s License Office asked you to write a program that grades the written portion of the driver’s license exam.
The exam has 20 multi choice questions. Your app should store the correct answers in an array. It should ask the user to enter the student’s answers for each of the 20 questions and the answers should be stored in another array.
After the answers have been entered, the program should display a message indicating whether the student passed or failed the exam. Student must answer 15 of the 20 questions to pass the exam. It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly answered questions.
Input validation: Only accept the letters A, B, C or D as answers.
Drivers Number Nine Visual Arts
DOWNLOAD SOURCE FILES: yt-7-9-DriversLicenceExam