Skip to content

kqxth25/Quizzes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

131 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Trivial Quiz β€” CSC207 Course Project

image

Trivial Quiz is a Java desktop application built following the principles of Clean Architecture.

The system allows users to log in, select quizzes, answer questions, and view results.

Creators can retrieve quizzes from a public API (OpenTDB) and load them into the system.


πŸš€ Features

πŸ§‘β€πŸ’» User Features

  • User Login / Signup
  • Browse available quizzes
  • Answer quizzes with previous/next navigation
  • Progress tracking
  • Submit quiz & view results
  • (Optional) View quiz history

πŸ§‘β€πŸ« Creator Features

  • Creator Login
  • Retrieve quiz data from an external API
  • Convert API results into Quiz & Question entities
  • Display imported quizzes in the UI

πŸ‘€ Demo

If you click on "I am a User" on HomePage:


πŸ§‘β€πŸ’» User Signup and Login


πŸ“š Select Quiz to Start


πŸ“ Answering the Quiz


πŸ“Š Submit and Get Your Result


πŸ” View the Detail and Share It


If you click on "I am a Creator" on HomePage:


πŸ”‘ Creator Login

(The password for creator is kfc BTW)


🧰 Creator Managing the Quiz


🌐 Public Quiz API (External Data Source)

This project retrieves quiz data dynamically from the:

πŸ”— Open Trivia Database (OpenTDB) https://opentdb.com/api_config.php

No API key is required.

Import Flow:

  1. Creator selects Import Quiz
  2. System sends an HTTP request to OpenTDB
  3. JSON results are parsed
  4. Quiz & Question entities are created
  5. Quiz is stored in the repository and shown in the UI

🧱 Architecture (Clean Architecture)

🧠 This project strictly adopts a layered design:

image

⭐ Benefits of Clean Architecture

  • UI is independent from business logic
  • Data sources are independent and can be swapped (API ↔ local CSV files)
  • Use Cases are pure and framework-agnostic
  • High modularity & testability

πŸ›  Running the Application

β–Ά Run with IntelliJ IDEA (Recommended)

  1. Clone the repository
  2. Open the project in IntelliJ IDEA
  3. Navigate to:
src/main/java/app/Main.java
  1. Right–click the file β†’ Run 'Main.main()'
  2. The GUI application will start

πŸ§ͺ Testing

Use Case Interactors prepared for unit testing

Mockito can be used to mock data access and presenter layers

Tests belong in:

src/test/java

πŸ‘₯ Team Members

Name Role
Johnny Mao (Usecase 1) User Login and Selectquiz
Ivan Wen (Usecase 2) Answer Quiz
Kevin Qiu (Usecase 3) Submit and View result
Aiden Choo (Usecase 4) Manage Quiz
Tomas Bartholo Souto (Usecase 5) Creator Login and User veiw History

About

A quiz management application that allows users to browse, take, and track quizzes, while enabling creators to import, preview, and manage quiz questions.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages