Question
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).
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:
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).
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).
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 5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started