Need help how to structure exam app logic

Hi, there guys - hope you can help me as I’m a bit stuck in my project logic.

I’m creating an exam app that allows users to prepare for exams. The user can practice for exams with 40 multiples choice questions that should be randomly selected from the database and at the end, the user sees the result if they passed or not.

However, I’m struggling with a few things:
1- I can’t get my head around how to create the exam but only show one question at a time instead of all 40 at once. I want to create a “previous” “next” type of navigation.

2- Since I only show the result at the end, how should go about saving the answers? Should I save it as the user progress in the exam or save it all at the end?

3- How should I compare the answers to calculate the result? I’m thinking about “create a new thing” when the exam starts with all the randomly selected questions and respective answers and add there the user answers and somehow compare them to calculate the result. Not really sure if this makes sense.

Anyone got any tips on how to approach this in an efficient way of doing this logic please let me know!
Many thanks in advance!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.