Officer Role Quiz
We wanted to engage students more interactively, so we created a quiz that uses their choices to determine which officer role best suits them. This way, they can confidently run for that role in the next officer election. The quiz helps remove the guesswork and provides students with a much more clearer idea of what role they fit best.
View codeWhat I learnt
- I first used if statements to help determine the role that should be given to user once the quiz is completed but this was bad practice as code was repeated. Therefore I used the find() method to efficiently determine the user’s final result. This approach is much simpler than relying on multiple if statements, which was less efficient.
- I used a point system to help with user results. To ensure that users received the correct role based on their answers and accumulated points, I researched methods for accurate scoring. I then implemented a threshold system, each role has a predefined threshold, and find() returns the first role whose threshold is met or exceeded by the user’s total points. This ensures that each result is unique and tailored to the individual user.

Future Improvements
- Provide more questions to extract a more truly tested officer role result as 7 does not fell like enough. To counter this, we do need to keep in mind that user engagement as users may start to get bored and see more questions as tedious.
- Improve the UI on mobile so that all questions fit on one screen and reduce scrolling.
Screenshots

