Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Grader (parallel arrays) C++ The input files are single characters (A, B, C, D ... X, Y, Z), one per line. Use functions as appropriate
Grader (parallel arrays) C++
The input files are single characters (A, B, C, D ... X, Y, Z), one per line.
Use functions as appropriate to perform the various tasks required.
Use the sample input files provided on Moodle for your screen shot.
As always, prompt the user for the two file names.
As always, output should be appropriately formatted.
One of your professors has asked you to write a program to grade her final which consist of only 20 multiple-choice questions. Each question has one of four possible answers: A, B, C, or D. The file CorrectAnswers.txt contains the correct answers for all of the questions, with each answer written on a separate line. The first line contains the answer to the first question, the second line contains the answer to the second question, and so forth. (Download the book's source code from the Computer Science Portal at www.pearsonhighered.com/gaddis. You will find the file in the Chapter 07 folder.) Write a program that reads the contents of the CorrectAnswers.txt file into a char array, then reads the contents of another file, containing a student's answers, into a second char array. (You can use the file StudentAnswers.txt for testing purposes. This file is also in the Chapter 07 source code folder.) The program should determine the number of questions that the student missed, then display the following: - A list of the questions missed by the student, showing the correct answer and the incorrect answer provided by the student for each missed question - The total number of questions missed - The percentage of questions answered correctly. This can be calculated as Correctly Answered Questions : Total Number of Questions - If the percentage of correctly answered questions is 70 percent or greater, the program should indicate that the student passed the Otherwise, it should indicate that the student failed theStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started