Agility Kata “Filling Out a Questionnaire III”
Add the following features to the questionnaire application:
- Questions can require the user to enter some text for an answer. For such questions only the question is shown and a text entry field. A free form answer question will only show one text entry field and no “Don ́t know” option. If the user does not know the answer, she can enter any character to mark the question as answered.
- Questions can be required or optional. The score can be viewed only after having answered all required questions. Required questions should be marked in the user interface.
The file format now looks like this:
?Which of these animals is a mammal
??What is the sum of 2+3
?What is the result of 2*3
Questions starting with “??” are optional, all others are required to be answered.
An option preceded by a “:” will not be shown but needs to be entered by the user.