An Android application built with Kotlin and Jetpack Compose to test and reinforce knowledge of Object-Oriented Programming principles.
This project was built as the final assignment for my second-semester Object-Oriented Programming (OOP) course. The goal wasn't just to build another quiz app, but to create a practical, hands-on demonstration of OOP concepts.
Quizzler is the result: a native Android application where the codebase itself is a learning resource. It's designed to showcase how principles like Abstraction, Encapsulation, Inheritance, and Polymorphism are implemented in a modern Android app using Kotlin, Jetpack Compose, and the MVVM architecture.
| Home (Light) | Home (Dark) | Quiz Feedback | Results Screen |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- Multiple Quiz Categories: Test your knowledge in five specific areas:
- General OOP Concepts
- Encapsulation
- Inheritance
- Polymorphism
- Abstraction
- Language Selection: Choose OOP questions tailored for different languages (Java/Kotlin, C++, Python).
- Interactive UI: A clean and straightforward user interface built entirely with Jetpack Compose.
- Instant Feedback: See immediately whether your selected answer is correct or incorrect.
- Score Tracking: Receive a final score and a "Congratulations" message upon completing a quiz.
- Dark/Light Theme: Includes a toggle to switch between dark and light modes, with a dynamic theme that respects system settings.
This project is built using MVVM (Model-View-ViewModel) and is structured to actively showcase the four pillars of OOP.
- Language: 100% Kotlin
- UI Toolkit: Jetpack Compose with Material 3
- Architecture: MVVM (Model-View-ViewModel)
- Core Libraries: AndroidX Lifecycle (for
ViewModel) and Jetpack Compose
-
Abstraction
QuizDataSourceInterface: This interface defines a contract for what a data source must provide (e.g.,getInheritanceQuiz()). It hides the complexity of where the questions come from. The rest of the app doesn't know or care if the data is hardcoded, fetched from a local database, or downloaded from the internet.
-
Encapsulation
QuestionData Class: This class bundles the data (question text, options, correct answer) and related behavior into a single, cohesive unit. By usingval, the data is made read-only, protecting the object's state from accidental external modification.QuizViewModel: The ViewModel encapsulates all the business logic and state (the current score, question index, etc.). The UI (View) only interacts with exposed methods likeonAnswerSelected()and observes state, without ever directly manipulating the logic itself.
-
Inheritance
ViewModelSubclassing: BothQuizViewModelandThemeViewModelinherit from theandroidx.lifecycle.ViewModelclass. This allows them to reuse all the lifecycle-aware functionality of the parentViewModel(like surviving configuration changes) while adding their own specialized features for managing quiz and theme state. This is a classic "is-a" relationship.
-
Polymorphism
QuizDataSourceImplementations: TheQuizViewModelis designed to work with any object that implements theQuizDataSourceinterface. We haveJavaQuizData,CppQuizData, andPythonQuizData. The ViewModel can hold an object of any of these types and call the same methods (e.g.,getGeneralQuiz()) on it, and the correct set of questions will be returned. This ability to use different object types through the same interface is a key example of polymorphism.
The latest installable .apk file is available on the Releases page.
- Navigate to the Latest Release
- Under Assets, download the
Quizzler-v1.0.0.apkfile - Open it on your Android device (enable Install from Unknown Sources if prompted)
Interested in building the app yourself or contributing?
- Clone the repository:
git clone [https://github.com/mahad2006/Quizzler-App.git](https://github.com/mahad2006/Quizzler-App.git)
- Open the project in Android Studio (Iguana or newer).
- Let Gradle sync and build the project.
- Run on an emulator or a physical device.
Contributions are welcome! If you have a feature request, bug report, or want to contribute code, please feel free to:
- Open an issue to discuss the change.
- Fork the repository and create a new branch.
- Submit a pull request with your changes.
My name is Mahad (codewithmahad), and I’m a software developer and student passionate about building practical, well-designed applications.
This project was a joy to build — combining my academic studies with my passion for mobile development.
This project is licensed under the MIT License.
Developed with ❤️ by Shaikh Mahad
© 2025 Quizzler — All rights reserved.



