Team Project C
Due Monday, April 7, 3:30pm, CEC 121
Questionnaire
The questionnaire is recorded in the file ques.dat. The database of pre-recorded responses (to which the person at the keyboard's response is compared) resides in the file resp.dat.
The prompts in the interaction are questions from the questionnaire file (starting from the question in the first questionnaire item in the file, continuing with the question in the next item, and so on). Questions should be re-formatted to fit on a 60-space line, left justified, but not necessarily right justified. If a question contains a word with more than 60 characters, that word can appear on a line by itself which, of course, will exceed the limit for line width.
Each answer must be one of the valid answers designated in the corresponding questionnaire item (except that the comparison should ignore letter-case if either the answer entered from the keyboard or the valid answers from the questionnaire item contain letters -- for example, a keyboard entry of "C1b" should match a valid answer represented as "c1B", "c1b", or "C1B", as well as "C1b"). If an entered answer matches none of the valid answers, then the person at the keyboard should be asked to re-enter the answer.
a b c d e
0 1 2 3 4
Then the answer "a" would be converted to the number 0, "b" to 1,
and so on. In general, an answer matching the
n-th
word on the valid-answers line is converted to the number denoted by the
n-th
word on the numeric-equivalents line.
Ground Rules