I am need a boost in writing a program that processes test data. I don't know how to start it.
This is what the the question says:
"The teacher needs help in grading a true/ false test. The student's IDs and test answers are store in file (I don't get that). The first entry in the file contains the answers to the test in the form:
Every other entry in the file is the student ID,
followed by a blank,
followed by the student's response.
ABC54301 tffftfftftff ttf
Each answer is 2 points, each wrong answer is -1 point and no answer is no points. The output is the student's ID, followed by the answers. followed by the test score, followed by the test grade.
You'll also have to play with strings to get the student ID. A simple
gradefile >> student_id;
will suffice to get it. After that, use single character input until you get to the end of line (you will read a '\n'). I suggest you write a function to read just the true/false scores; you can use it to read the key and then each student's responses.
For some clarification, your input file will look something like: