Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.95 KB

README.md

File metadata and controls

42 lines (32 loc) · 1.95 KB

Trivia Quiz Game

Description

This repository contains two distinct packages within the same Java project, each implementing a different approach to a trivia quiz game.

Package 1: TriviaQuiz

The first package implements the trivia game using ArrayLists, arrays, and collections. It manages questions, answers, and user responses within these data structures. This version utilizes in-memory data handling for the game logic.

Package 2: TriviaFileReader

The second package follows an alternate approach. It obtains questions from a file and employs a StringBuffer for efficient question handling. This version checks the player's answer against an answer key obtained from the file.

Features of Each Package

Package 1

  • Utilizes ArrayLists, arrays, and collections for data handling
  • Manages questions and answers within these data structures
  • Implements game logic using in-memory data management

Package 2

  • Retrieves questions from a file for improved scalability
  • Utilizes StringBuffer for efficient question handling
  • Compares player answers with an answer key obtained from the file

Installation

  1. Clone the repository:
    git clone https://github.com/Aburraq/TriviaQuiz.git
  2. Revise file source name according to your computer and optionally questions(I know they are little lame).

Usage

  • Both packages exist within the same project and can be accessed separately.
  • Follow the specific instructions within each package's directory to run the respective game.

File Structure

  • TriviaQuiz: Contains the code for the first package.
  • TriviaFileReader: Contains the code for the second package.

Contributing

Contributions to enhance either package are welcome! Feel free to fork the repository and submit pull requests.

Acknowledgements

  • Both packages are different implementations of the trivia quiz game within the same project.
  • Each package offers a unique approach to handling game logic and question management.