CSC228

Assignment 1 (Review of C++ constructs)

 

        Write a program to grade a set of true/false tests.  There are 10 true/false questions.  True is represented by T, and false is represented by F.  The key to the quiz is in file quiz.doc followed by the student responses.  Each student's name (maximum of 15 characters) immediately follows the student's last answer.  For each student write out the name followed by the grade.  Use stream failure (eof) to terminate processing. 

Input

        The data as described in the Problem Statement.  Here are examples of three lines of input.

TFTFTFTFTT

TFTFTFTFTTJoe Jones

TFTFTFTFTFJanet Jerome

Output

Each student's name followed by a grade.  For example, the first two of output would be:

 

                        Joe Jones  100

                        Janet Jerome  90

Processing

Use modular programming.  At the very least, you should have function that fills an array with the answer key, and another function that figures out the actual grade of each student.  Do as little work in the main program as possible.

Handin

Your source code, WELL COMMENTED!

A copy of your output (You may copy this to the bottom of your source code, and hand in both together)