This Android application, a Mobile Math Quiz Game, challenges users with five timed math questions, tracking scores based on correct and incorrect answers. The questions are fetched from a CSV file and presented randomly without repetition.
- 📝 User Registration: Users can register by providing their username, email, and birthdate, with checks for existing nicknames in the database.
- 🕹️ Quiz Mechanics: The application loads questions from a CSV file, presenting them one at a time with a 10-second timer for each.
- 📊 Scoring System: Points are awarded for correct answers and deducted for incorrect answers or if the timer expires.
- 🏁 End of Quiz Summary: Displays the user's final score and inserts it into the database. Various queries are available to fetch top scores, count total players, and more.
- 🔄 Play Again Option: Allows users to restart the quiz or exit.
zainab_fG9nw9xt.mp4
-
SQLite Database: Utilizes SQLite for storing user data and scores.
-
Random Question Selection: Ensures that the same question is not repeated within a single game session.
-
Timed Responses: Each question is timed with a countdown, encouraging quick thinking.
-
Feedback Mechanisms: Toast messages provide instant feedback on user responses.
- Clone the repository:
git clone https://github.com/zainabja52/MathQuizGame
- Open the project in Android Studio.
- Build and run the application on an Android device or emulator (API Level 26 to match a Pixel 3a XL with graphic=software).
- MainActivity.java: Manages user registration and validation.
- QuizActivity.java: Handles loading and displaying questions, timers, and collecting answers.
- EndActivity.java: Displays the game's final scores and query results.
- DatabaseHelper.java: Manages all interactions with the SQLite database, including CRUD operations and custom queries.
-
Table 1: Scores
id: Auto-incremented identifier.nickname: Unique username.score: Points scored by the player.timestamp: Time of record creation.
-
Table 2: Questions
id: Unique identifier for each question.question: The quiz question text.correct_answer: The correct response to the question.option1,option2,option3,option4: Incorrect answers provided as options.
Colors and styles can be customized in the res/values/colors.xml and drawable resources to enhance visual appeal and match brand guidelines.
Interactive elements such as buttons and toast messages are used throughout the application to guide the user experience and provide feedback.
Robust error handling mechanisms ensure the application handles file reading failures or database connectivity issues gracefully, enhancing user experience and application stability.
