About the Project

ROQuiz is a cross-platform quiz application I developed to help me and my colleagues study the theory for the course Operational Research M, at Alma Mater Studiorum, University of Bologna.

I wrote the first version in Java/JavaFX in about half a day, a few days before the exam. Once I passed it, I rewrote the whole thing in Dart, using it as an excuse to learn mobile development with Flutter. Since then the project has slowly turned into a small community effort: other students opened issues and pull requests with bug fixes and new questions, and the question pool grew from the ~90 questions I started with to the 119 currently shipped with the app.

The app runs on Android, Windows, Linux and directly in the browser, and it’s released under a CC BY-NC-SA 4.0 license.

ROQuiz desktop menu
Desktop menu
ROQuiz mobile quiz
Quiz on mobile

How Does It Work

The application simulates an exam quiz: it randomly draws a set of multiple-choice questions from a pool and gives you a limited amount of time to answer them. The defaults mirror the actual exam conditions — 16 questions, 5 answers each, and an 18 minutes timer — but both the number of questions and the timer can be changed from the settings, and answers can optionally be shuffled.

While the quiz is running, you can navigate back and forth between questions and change your answers; the timer turns yellow, orange and red as time runs out. Once you submit (or the time expires), the app reveals the correct answers and shows a recap with correct/wrong answers and a quiz grade. Since the exam grade is a weighted average of the written test and the quiz, you can also type in your written test score and let the app compute the estimated final grade:

quiz grade  = round(correct / total * 16) * 2
final grade = written * 2/3 + quiz / 3

Questions are grouped by topic, and from the Topics view you can pick which ones to include in the pool, either by enabling/disabling entire topics or by choosing how many questions to draw from each one. The complete list of questions is browsable in-app, with a search bar to look for a specific question by keyword.

The app also keeps itself up to date: on startup (or on demand, from the settings) it queries the GitHub API to check whether a newer release is available, and whether the question file has been modified since the last download — in which case the new Domande.txt is fetched from the repository. This is what makes the crowdsourced question pool actually useful: when a colleague contributes a new question, everyone gets it without reinstalling anything.

The Question File

Questions are not hardcoded: they’re loaded from a plain text file (Domande.txt) with a deliberately simple format — a topic line starting with @, then, for each question, one line for the question, 5 lines for the answers, one line with the correct answer letter, and a blank line as separator:

@Programmazione Matematica ==========================================
Dato un insieme F, un intorno è
A. L'insieme di tutti i sottoinsiemi di F
B. L'insieme dei punti di F a distanza minore di epsilon da un punto x di F
C. Una funzione N: F -> 2^F
D. Una combinazione convessa di due punti x e y di F
E. Nessuna di queste
C

@Dualità ============================================================
Se un problema di programmazione lineare (primale) ha soluzione ottima finita, allora:
A. Il suo duale non è detto che abbia soluzione ottima finita.
B. Anche il suo duale ha soluzione ottima finita e i valori delle soluzioni coincidono.
C. Anche il duale ha soluzione ottima finita, ma non è detto che i valori delle soluzioni coincidano.
D. Anche il duale ha soluzione ottima finita, ma i valori delle due soluzioni non coincidono.
E. Nessuna di queste
B

The format is simple enough that anybody can contribute new questions with a text editor, and the file can also be edited from inside the application, or replaced with an external one — which means ROQuiz can be used for any other multiple-choice exam, not just Operational Research.

The current pool contains 119 questions, split into 6 topics:

TopicQuestions
Programmazione Matematica9
Programmazione Lineare28
Algoritmo del Simplesso28
Dualità23
Programmazione Lineare Intera18
Complessità13

Since the file is the single source of truth for every platform, a GitHub Actions workflow validates it on changes (encoding, structure, number of answers, correct answer letters), while another one keeps the README question count and the contributors list up to date.

Features

The application includes the following features:

  • simulation of a quiz with exam-like conditions (timer, randomly drawn questions, results and grade estimate);
  • dynamic loading of the questions from a text file (currently 119 questions);
  • topic selection, with the option to cap the number of questions per topic;
  • in-app question list with a keyword search;
  • in-app editing of the question file, or loading of an external one;
  • automatic/manual check for new app versions;
  • automatic/manual check for new questions;
  • persistent settings: number of questions, timer, answer shuffling, confirmation alerts, dark theme.

Project History

In our students Telegram group, someone had previously shared an Android app with a few quiz examples: paolopiano1997/QuizRicercaOperativa. Although it was somewhat useful, since it featured a set of full examples with questions and answers, the application was quite buggy and limited. Before the exam, another student posted a more comprehensive set of questions in a Google Form. This set included almost 90 questions, but it wasn’t customizable, and there was no way to simulate a quiz without using additional tools. For these reasons, I decided to develop an initial JavaFX prototype of a “““better””” application, which my twin and I beta-tested before sharing it with the rest of the students.

After the exam, since I found the application extremely useful, I started upgrading it, adding more and more features, until I decided to create a mobile version.

Why?

The list of motivations is long: I love side projects and open-source development; I had almost no experience in mobile development, and as a computer engineering student, it seemed like a valuable skill to add to my toolkit; I love learning new shiny stuff; and, ultimately, I wanted to create something genuinely useful, and a mobile application seemed to me a great way to exercise, since you can bring your smartphone wherever you want.

With that in mind, I started exploring different technologies and frameworks until I came across Flutter — a relatively new framework (released in 2017; it was 2021 at the time) that caught my attention. Flutter stood out because it offered excellent support for cross-platform development. At the time, Kotlin Multiplatform wasn’t yet widely known, so Flutter felt incredibly revolutionary, especially since it was developed by Google and was open source.

After diving into the documentation (which, like most Google products, was really well-made), I managed to create a simple and functional prototype, which I released as ROQuiz v1.3-mobile_beta.

From there the app kept growing release after release, up to the current v1.11.5, which covers Android, Windows, Linux and the web. The original Java/JavaFX desktop application is still around, but it’s no longer maintained: both it and the first Flutter app now live in the legacy/ directory of the repository.

Contributions

What I like the most about this project is that it outlived my exam by years, because other students kept it alive. Nine people have contributed so far, mostly by adding or fixing questions, and to make that as frictionless as possible the repository provides issue templates for reporting a wrong answer, proposing a new question, filing a bug or requesting a feature — so contributing doesn’t even require knowing Git.

A special mention goes to Lorenzo di Palma and Filippo Veronesi, who wrote a document explaining most of the quiz questions, which is distributed together with the app.

What’s Next

The project is currently being refactored into a v2.0. The main goal is cleaning up the codebase and making it more readable and maintainable — the original app was written while I was learning Flutter, and it shows — but the new version will also bring new features, such as quiz history, statistics and additional settings.

The beta is already playable in the browser: you can try it here.

Disclaimer: the app is meant for practicing after studying the theory (preferably from the book). I take no responsibility whatsoever for mistakes in the questions or the answers, nor for spectacular exam failures. Use it wisely, and good luck with the exam <3