Programming Assignment 4
Test Writer and Reader
This assignment requires each
student to write two programs, one for a teacher one for a student. The teachers program, “Test Writer”, will be
used to create tests and save them to files to be administered later. The students program, “Test Taker”, will read
the test file, get an answer to each question from the student and grade the
Three files will be submitted with
multiple-choice and true/false questions are allowed.
- All Questions
will appear on only one line.
can only have one line.
questions will be marked by the tags, <MULTIPLE_CHOICE> and
incorrect multiple-choice answer will be preceded by a <ANSWER> tag.
correct multiple-choice answer will be preceded by a
questions will be marked by the tags, <TRUE_FALSE> and
answer to a true false question will appear in the form of a tag on the
line immediately following the question. <TRUE> or <FALSE>
will always be on their own line. (No other text should appear on a tag
should be case sensitive.
student program will number the questions in sequential order.
student program will letter the answers in sequential order for multiple
multiple choice questions can have 1-26 associated answers.
true/false questions will only have the choices T or F (case insensitive).
“Test Writer” must let the teacher specify which answer is correct for
both types of questions.
“Test Writer” must allow only one correct answer per question.
user interaction with the test reader should be some what similar to Test Reader.exe
Test File example
Who is the president of Harding?
Cows can fly.
Cows can moo.