Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The local PennDOT Office needs a program to grade the written portion of the drivers test. Students take this test upon completing the classroom portion

The local PennDOT Office needs a program to grade the written portion of the drivers test. Students take this test upon completing the classroom portion of drivers ed. The test has 20 multiple choice questions. The correct answers are:

1. B, 2. D, 3. A, 4. A, 5. C, 6. A, 7.B, 8. A, 9. C, 10.D, 11. B, 12. C, 13. D, 14. A, 15. D, 16. C, 17.C, 18. B, 19.D, 20.A

A Your program should store the correct answers in an array. It should then read the answers for a student from a file. Those answers should be stored in a parallel array. You should compare the correct array with the student array. For each entry the program should store a value in a third parallel array of Boolean. If the answer is correct, the program should store true in the third array. If the answer was incorrect, the program should store false. The program should then use the third array to determine the number of correct answers, the number of incorrect answers, and whether or not a student passed. (15 or more correct) You should have a function to score the student and separate functions that calculate the information required in the output.

The program should write out a table with one line for each student. For each student it should report the number of correct answers, the number of incorrect answers, whether or not the student passed, and a list of the numbers for the questions missed.

The table should have headings for the columns. Student answers can be found in the data file driving.dat. Each line contains the 20 answers a student gave. You do not know how many students so you must process until the end of the file. ****data.dat*** file has 7 lines 20 answers on each line. For C++

B B A A C B B A D C B C D A D C C B B C

B D A A C A B A C D B C D A D C C B D A

B B A A C C B A C D B C D A C C C B D A

A B A A C A A A C C B C D A C C C B D A

A B C D A B C D A B C D A B C D A B C D

B D A A C A A A C D B C D A D C C B D A

B D A A C A B A D C B C D A D C C B D A

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

Name two ways in which a limited company can raise finance.

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago