Skip to content

nafizkamal11/Quiz-System

Repository files navigation

📝 Quiz Runner

Table of Contents

  1. 📝 Overview
  2. 🛠️ Features
  3. 🖥️ Technologies Used
  4. 🔒 Prerequisites
  5. 🏗️ Project Structure
  6. 🚀 How to Run
  7. 📋 JSON File Structure
  8. 📡 Future Enhancements

💭 Overview

The Quiz Runner project is an interactive quiz application that allows two types of users:

  1. Admin : can create and save quizzes
  2. Student : can take the quiz and get graded based on their performance.

This application adheres to Object-Oriented Programming (OOP) principles and modern Java practices.

🛠️ Features

Admin Role : Executing as Admin

  • Add new quiz questions, options, and correct answers.
  • Save questions into a JSON file for persistence.

Student Role : Executing as Student

  • Attempt 10 randomly selected quiz questions.
  • Receive feedback and grading based on performance.

Data Management

  • All questions and user information are stored and retrieved from JSON files.

🖥️ Technologies Used

  • Java
  • JSON (using org.json.simple library for JSON parsing and writing)
  • Object-Oriented Design
  • IntelliJ IDEA

🔒 Prerequisites

  • JDK 17 or above
  • IntelliJ IDEA or any Java-supported IDE

🏗️ Project Structure

QuizRunner/
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   ├── QuizRunner.java
│   │   │   ├── SampleQuestion.java
│   │   │   ├── QuizService.java
│   │   ├── resources/
│   │   │   ├── quiz.json
│   │   │   ├── users.json
├── README.md

🚀 How to Run

  1. Clone the repository:

    git clone https://github.com/nafizkamal11/Quiz-System.git
    cd QuizRunner
    
  2. Open the project in your preferred IDE.

  3. Run the QuizRunner.java file.

  4. Choose your role when prompted:

    • Admin: Create quizzes.
    • Student: Attempt quizzes.

📋 JSON File Structure

users.json

Stores user credentials and roles:

[
  {
    "username": "admin",
    "password": "adminpass",
    "role": "admin"
  },
  {
    "username": "student",
    "password": "studentpass",
    "role": "student"
  }
]

quiz.json

Stores quiz questions:

[
  {
    "answerkey": 2,
    "option 3": "A well-designed user interface.",
    "option 4": "Efficient algorithm performance.",
    "question": "5. What does the term 'bug' refer to in software testing?",
    "option 1": "An intentional feature added to the software.",
    "option 2": "An error or flaw in the software."
  }
]

📡 Future Enhancements

  • Add support for multiple-choice answers.
  • Implement a web interface for better user experience.
  • Use a database for better scalability.

About

Quiz Runner is a simple yet powerful quiz application built in Java, allowing admins to create and manage quizzes while students can attempt them and receive grades. The project follows Object-Oriented Programming (OOP) principles and stores quiz data in JSON files for persistence.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages