Skip to content

harshbki/QuizGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Java Quiz Game - Console Application

A command-line quiz game that fetches questions from OpenTrivia API with score tracking.

πŸ“ Files Included -

1.QuizGame.java # Main game logic (timer, scoring)

  1. QuizService.java # API communication & JSON parsing

  2. Question.java # Data model for questions

🌟 Key Features-

API Integration: Fetches questions from OpenTriviaDB

Timer: 15-second limit per question

Scoring: Tracks correct/incorrect answers

Data Storage: Saves high scores in data/scores.txt

πŸ› οΈ How to Run

  1. Requirements:

  2. Commands:

# Compile
javac -cp .:json-simple-1.1.jar src/*.java

# Run
java -cp .:json-simple-1.1.jar src/QuizGame

## βœ… Project Requirements Met -
HTTP GET requests using HttpURLConnection

JSON parsing with json-simple

CLI-based game interface

OOP structure with separate classes

author harshit

About

- Added QuizService for fetching questions from OpenTrivia API - Created Question model to store quiz data - Built main QuizGame class with timer, scoring, and retry feature - Added high score tracking system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages