Skip to content

Ashika005/javaquizgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Fundamentals Quiz Game

A command-line quiz application that tests your knowledge of basic Java programming concepts. This interactive game features multiple-choice questions covering essential Java fundamentals.

📋 Table of Contents

✨ Features

  • 10 Multiple-Choice Questions covering Java fundamentals
  • Real-time Feedback on correct and incorrect answers
  • Score Tracking with percentage calculation
  • Performance Rating based on your final score
  • Input Validation to handle invalid user entries
  • Clean Console Interface with formatted output

🔧 Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • A terminal/command prompt
  • (Optional) IntelliJ IDEA or any Java IDE

📥 Installation

  1. Clone this repository:
git clone https://github.com/yourusername/java-quiz-game.git
  1. Navigate to the project directory:
cd java-quiz-game

🚀 How to Run

Using Command Line:

  1. Compile the Java file:
javac JavaQuizGame.java
  1. Run the program:
java JavaQuizGame

Using IntelliJ IDEA:

  1. Open the project in IntelliJ IDEA
  2. Right-click on JavaQuizGame.java
  3. Select "Run 'JavaQuizGame.main()'"

🎮 Game Rules

  1. The game presents 10 multiple-choice questions
  2. Each question has 4 options (numbered 1-4)
  3. Enter the number corresponding to your answer
  4. Receive immediate feedback on whether your answer is correct
  5. At the end, view your total score and performance rating

Performance Ratings:

  • 90-100%: 🏆 Excellent! You're a Java expert!
  • 70-89%: 👍 Great job! You have a solid understanding!
  • 50-69%: 📚 Good effort! Keep practicing!
  • Below 50%: 💪 Keep learning! Review the fundamentals!

📚 Topics Covered

  • Primitive data types
  • Default values
  • Java keywords and syntax
  • Arrays
  • JVM (Java Virtual Machine)
  • Operators
  • Object-Oriented Programming (OOP) concepts
  • Inheritance
  • Method overriding
  • Access modifiers

📸 Sample Output

========================================
  JAVA FUNDAMENTALS QUIZ GAME
========================================
Answer the following questions by entering the option number (1-4)

Question 1: What is the default value of a boolean variable in Java?
1. true
2. false
3. null
4. 0

Your answer: 2
✓ Correct!

----------------------------------------
...

========================================
  QUIZ COMPLETED!
========================================
Your Score: 8/10
Percentage: 80.00%

Performance: 
👍 Great job! You have a solid understanding!
========================================

📁 Project Structure

java-quiz-game/
│
├── JavaQuizGame.java    # Main game file
├── README.md            # Project documentation
└── .gitignore          # Git ignore file

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/new-questions)
  3. Add your changes (e.g., more questions, difficulty levels)
  4. Commit your changes (git commit -m 'Add new feature')
  5. Push to the branch (git push origin feature/new-questions)
  6. Open a Pull Request

Ideas for Contributions:

  • Add more questions
  • Implement difficulty levels (Easy, Medium, Hard)
  • Add a timer for each question
  • Create a leaderboard system
  • Add categories (OOP, Collections, Exception Handling, etc.)

👨‍💻 Author

Ashika - https://github.com/Ashika005

🙏 Acknowledgments

  • Questions based on fundamental Java concepts
  • Inspired by the need for interactive learning tools
  • Built for Java beginners and students

Happy Learning! 🎓

If you found this helpful, please give it a ⭐!

About

A basic quiz game on java fundamentals!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages