how can i build a quiz?

Hi community, i am a beginner one user. after watching a video on how to build an offline mobile app i wanted to do the same just for excercise. but i thought that maybe i could do it as a quiz, as a multiple choice game for example. so my question could i set the questions and the answers? thanks for your time, sonia
3 answers

Hi Sonia,

You can take a look at the Survey builder example project.



I think you have to first take some actions on creating the domainmodel:

I think you need some entities like:

- Questions (where you can store the questions you will ask)

- Answeroptions (where you can store the options a user can choose between; this entity is related to questions)

- Quiz (the set of questions; this entity is related to questions)

- FilledInQuiz (this is an entity with, for every user doing a quiz, the stored answers)

Next step is to create some pages for creating and maintaining questions, answers, quizes

Next step is to create a page where a quizquestion will be shown and where the user can select an answer. On that page will be an action that saves the answer in the entity FilledInQuiz



The challenge seems to be the data model. I would create a Question Entity and an Answer Entity pointing to the question entity. In the answer entity you could have a boolean attribute, telling you if it is the correct or incorrect answer.
The rest is building the user interface and a game board counting the points.