Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

Students also viewed these Databases questions