Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Grading like a Scantron Input the Key to the test, then input the student answers to the test. Compare and grade the results using C=Correct

Grading like a Scantron

Input the Key to the test, then input the student answers to the test.

Compare and grade the results using C=Correct and W=Wrong

3 arrays are all you need!

Very much like this

Key A B C D A B C D A B C C A B C D A B C D

Answers A A C A A B C D A B C D A B B D A B C D

C/W C W C W C C C C C C C W C C W C C C C C

Percentage Correct = 80%

//System Libraries #include //Input/Output Library #include //File I/O #include //String Library using namespace std;

//User Libraries

//Global Constants, no Global Variables are allowed //Math/Physics/Conversions/Higher Dimensions - i.e. PI, e, etc...

//Function Prototypes void print(const string &); void read(const char [],string &); int compare(const string &,const string &,string &);

//Execution Begins Here! int main(int argc, char** argv) { //Set the random number seed //Declare Variables string key,answers,score; char fileKey[]="key.dat",fileAns[]="answer.dat"; float pRight; //Initialize or input i.e. set variable values read(fileKey,key); read(fileAns,answers); //Score the exam pRight=compare(key,answers,score); //Display the outputs cout<<"Key ";print(key); cout<<"Answers ";print(answers); cout<<"C/W ";print(score); cout<<"Percentage Correct = "<

//Exit stage right or left! return 0; }

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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

ISBN: 0805302441, 978-0805302448

More Books

Students also viewed these Databases questions