Agility Katas "Filling Out a Questionnaire I"

Write an application to fill out a questionnaire.

The user is presented with a questionnaire containing several questions. The user answers each question by clicking on an option. After all questions have been answered, the score achieved can be seen.

Each question can have one or more options. An additional option is always "Don't know". Only one option is the answer to the question.

The score shows how many (e.g. "9 out of 10 questions (90%)") and which answers (including selected and correct option) were given correctly by the user.

Here is a sketch of what a graphical front end for the application could look like:

The questionnaire is generated from a simple text file called questionnaire.txt (in the application directory), which looks like this:

Which of these animals is a mammal?
Ant
Bee
*Cat
What is the sum of 2+3
2
*5
6

All entries are single-spaced. Questions begin with a "?", lines after a question are regarded as possible answers. The answer option beginning with an "*" is the correct answer.

en_USEnglish