Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The history teacher at your school needs help in grading a True/false The studen

ID: 3635662 • Letter: T

Question

The history teacher at your school needs help in grading a True/false The students' IDs and test answers are stored in a file. The first cm ' file contains answers to the test in the form: Every other entry in the file is the student ID. followed by the student's responses. For example, the entry. ABC 54 301 TFT FT FIT TFTFTFFTTFT indicates that the student ID is ABC54301 and the answer to question 1 a True, the answer to question 2 is False, and so on. This student did not answer question 9. The exam has 20 questions, and the class has more dun 150 students. Each correct answer is awarded two points, each wrong answer gets one point deducted. and no answer gets zero points. Write a program that processes the test data. The output should be the student's ID. followed by the answers, followed by the test score. followed by the test pride Assume the following grade scale: 90%-100%, 80%-89.99%. 701-79.99%. 601-69.991. and 0%-59.99% F

Explanation / Answer

Ok so I wrote C++ code for you. I think this will definitely help you. #include #include #include #define M 4 //maximum number of students using namespace std; int main() { string *studentID; // array of pointers to c-strings string *studentResult; // array of pointers to c-strings string temp; //temporary variable string Result; //string to hold correct result int index; double score=0.0; double scale=0.0; char grade; int N=0; //maximum number of questions coutN; ifstream fin; fin.open("input.txt"); int i=0; getline(fin,Result); //store first line of file in Result studentID=new string[M+1]; //allocate memory to studentID studentResult=new string[M+1]; //allocate memory to studentResult for(i=0;i