Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Questions 1-3 deal with a program to grade student tests. Assume that the following constants has been defined: const int NUM_QUESTIONS = 10; //you can

Questions 1-3 deal with a program to grade student tests. Assume that the following constants has been defined: const int NUM_QUESTIONS = 10; //you can call it NUM_Q const int NUM_STUDENTS = 50; //you can call it NUM_S

1) Define a struct called StudentTest that can be used to store a student's name (string), their answers to NUM_QUESTIONS number of multiple choice questions (stored as an array of characters - each value will be A/D/C/D/E or blank - blank will be represented by question mark) and their score (possibly a decimal).

image text in transcribed

2) Tests are graded such that a right answer is 1 point, a wrong answer is -0.25 pts, but a question left blank is 0 pts:

image text in transcribed

Write code that will take in an array of chars representing the key (size defined by NUM_Q) and a reference to a StudentTest. It should score the student's answers against the key and set their score. (If you were lost on Q1, you can pretend test is just a plain array of chars the same length as the key and return the score).

image text in transcribed

3) Assume we have an array of students (size defined by NUM_STUDENTS). Write a function to calculate the number who passed (score of 6 or above). Assume all the tests have already been scored (the score member of each has been set correctly. (If you did not define a struct in Q1, pretend tests is an array of doubles with the scores of all the students).

image text in transcribed

Sample Scoring Criteria: Sometimes partial credit can be earned in a category. There may be answers which don't fit well with the categories listed and earna bonus or penalty to what would come from this chart struct StudentTest string name char answers[NUM Q] double score 1 5

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions