CSCI 201 – COMPUTER SCIENCE I
Project 4 Driver’s License
Due Date: October 25, Thursday
To provide students with the experience of
The local Driver’s License Office has asked you to write a program that grades the written portion of the driver’s exam. The exam has 20 multiple choice questions. A data file contains the correct answers as follows:
Your program should read above correct answers from the file to 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 student’s answers have been entered, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly 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 of showing the question numbers of the incorrectly answered questions.
Input Validation: only accept the letters of A, B, C or D as answers.
Answers of 20 questions·
CSCI 201 Computer Science I 2
An Example of Test Run
The output of your program might look like this:
Please enter the student's answers for each of the questions.
Press Enter after typing each answer.
Please enter only an A, B, C, or D for each question.
Question 1: B
Question 2: D
Question 3: A
Question 4: A
Question 5: A
Question 6: B
Question 7: B
Question 8: A
Question 9: C
Question 10: D
Question 11: B
Question 12: B
Question 13: D
Question 14: A
Question 15: D
Question 16: D
Question 17: A
Question 18: B
Question 19: D
Question 20: A
Student passed the exam
Correct Answers = 15
Incorrect Answers = 5
The list below shows the question numbers of the incorrectly
1. Design your algorithm first using a structure chart.
2. Write the program according to the structure chart in step 2. It should include main function and other functions.
3. In your program, write necessary documentation for each function required for this problem. You should also include comments about all parameters. See how this should be done by following the “Requirements for Programming Project” in D2L course page.
4. Before you test the program, design test data for all possible cases. Explain why you choose these data.
5. Insert comments in the program so that it can be read easily. You can follow the examples on the textbook. Don’t forget to include your name, section, csci account, file location and a description of the purpose of this program. You do this on the top of your program.
6. For other requirement, please see “Requirements for Programming Project” posted on D2L course page.
What to turn in
My tutorial contains C++ Program - Detailed comments
If you have more questions, please contact me via email email@example.com
I will help you any time
Thank you !