I want to write an application where the user has to answer several questions. The difficulty is that the third question might depend on the answers of question 1 and 2. For example:
- question A: possible answers A1 / A2 / A3
- question B: possible answers B1 / B2 / B3
- a. question C only if the previous answers where (A1 or A2) and B1
- b. question D for all other cases (if A3 or B2 or B3)
The questions and the possible answers should be written in some file, so they could be exchanged easily. And we need some code that always knows which question to ask next. I was thinking of xtUML but couldn‘t find anything that suits our needs.
Our code is going to be written in Perl. But anything (also in other programming languages) is welcome. Maybe someone thought this through and we can transform his ideas.
Do you have any idea what could help me here?