Question: please code in C++ and with comments so i can understand the code. Thank you. Create a program to grade a 20 question true/false test.
please code in C++ and with comments so i can understand the code. Thank you.
- Create a program to grade a 20 question true/false test.
- All input will come from a file
- The first line of the file contains the answer key for the test
- For example: TFFTFFTTTTFFTFTFTFTT
- Every other entry in the file is the student ID, followed by a space, followed by the students responses.
- Spaces in the student's answers indicate the student did not answer a question.
- For example, the entry: ABC54301 TFTFTFTT TFTFTFFTTFT 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.
- The class has an unknown number of students.
- Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero points.
- The output should be
- the students ID,
- the student's test score,
- the student's letter grade.
- Assume the following grade scale:
- 90%100%, A;
- 80% 89.99%, B;
- 70%79.99%, C;
- 60%69.99%, D;
- < 59.99%, F.
- All output should be written to a file and formatted properly.
- Test scores should be rounded to two decimal places
- Use a tab delimiter between student items (listed above)
- Write each student's data on a separate line.
- All arrays must be dynamic
- All interaction with the arrays must be done via a pointer.
- Use pointer arithmetic to traverse the arrays
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
