Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***All arrays must be dynamic*** ***All interaction with the arrays must be done via a pointer.*** ***Use pointer arithmetic to traverse the arrays*** Create a

***All arrays must be dynamic***

***All interaction with the arrays must be done via a pointer.***

***Use pointer arithmetic to traverse the arrays***

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.

sample input file:

TTFTFTTTFTFTFFTTFTTF ABC54102 T FTFTFTTTFTTFTTF TF DEF56278 TTFTFTTTFTFTFFTTFTTF ABC42366 TTFTFTTTFTFTFFTTF ABC42586 TTTTFTTT TFTFFFTF LKJ81672 TTTFTFFTFFTTFTFTF STD24151 TFTFTTTFTFTFFTTF

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago