In C++ plz Your Math professor needs help in grading a True/False test. The students’ ID and test answers are stored in a file testScores.txt. The first entry in the file contains answers to the test in the form:
All other entries in the file consist of a student ID, followed by white space, followed by a student’s responses and a new line. For example, the entry:
indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False, and so on. This student did not answer question 9, so there is an underscore (‘_’) in position 9. The exam has twenty questions and the class will never have more than 30 students.
Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero points. The lowest possible total point score is zero. Write a program that processes the test data from the input file. The output should be a table header followed by the student’s ID, followed by their answer, followed by their % score, followed by their letter test grade as illustrated below. Assume the following grade scale: 90% – 100% A; 80% – 89.99% B; 70% – 79.99% C; 60% -69.99% D; and 0% – 59.99% F. After outputting all the student data, output the student IDs with the minimum and maximum percent scores and average percent score for the entire test.
Write and use the following two functions (with prototypes above your main function and implementations below it) to help with the processing:
double getPercentScore(const string ANSWERS, const string KEY); // return the percent score
// based on student answers and the key
char getGradeScore(const double PERCENT); // return the letter grade based
// the percent score
Screen INPUT (user)/OUTPUT (program) – should be formatted as follows (example using the provided testScores.txt file)
StudentID Answers % Score Grade
ABC123 TFTFTFTTTTFTFTFFTTF_ 95.0 A
AAB000 TFTTTFTTTT_TFTFFT_FT 82.5 B
ZZT090 TTTFFFTTTFFFTTTFFF__ 30.0 F
DOZ003 TFTFTFTTTTFFFFFFFFFF 62.5 D
DDC123 _FTFTFTTTTFTFTFFTTFT 95.0 A
Min score is 30.0% for Student ID ZZT090
Max score is 95.0% for Student ID ABC123
Average is 73.0%
Why Choose Us
- 100% non-plagiarized Papers
- 24/7 /365 Service Available
- Affordable Prices
- Any Paper, Urgency, and Subject
- Will complete your papers in 6 hours
- On-time Delivery
- Money-back and Privacy guarantees
- Unlimited Amendments upon request
- Satisfaction guarantee
How it Works
- Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
- Fill in your paper’s requirements in the "PAPER DETAILS" section.
- Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
- Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
- From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.