Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📘 QuizApp Command Documentation

This is a Java Console-Based Quiz Application that allows users to create quizzes, add questions, and take quizzes interactively via a terminal interface.


🏁 How to Start

Compile and run the main application file:

javac QuizApp.java
java QuizApp

Upon running, you'll see:

Welcome to Quiz Generator!

Available commands:
Press 1 for create-quiz
Press 2 for add-question
Press 3 for take-quiz
Press 4 for exit

📌 Available Commands

🔹 1 - Create Quiz

Purpose: Create a new quiz by topic name.

Steps:

  • Enter a topic name (e.g., Java Basics).
  • If the topic already exists, the quiz won't be recreated.

Example:

Enter quiz topic name: Java Basics
→ Quiz created successfully.

🔹 2 - Add Question

Purpose: Add one or more questions to an existing quiz.

Steps:

  1. Enter the quiz topic name.
  2. Input:
    • The question text
    • Number of options (minimum 2)
    • Each option string
    • Correct option number (1-based index)
  3. Type done to finish adding questions.

Example Flow:

Enter quiz topic name to add questions: Java Basics
Enter question (or type 'done' to stop adding questions): What is JVM?
How many options you want to add = 3
Enter option 1: Java Virtual Machine
Enter option 2: Java Voice Manager
Enter option 3: Java Version Mode
Enter correct option number (1-3): 1
→ Question added to quiz.

🔹 3 - Take Quiz

Purpose: Attempt a quiz interactively.

Steps:

  1. Enter quiz topic name.
  2. Answer each question (1-based index).
  3. At the end, rate your experience from 1-5.

Example Flow:

Enter quiz topic name: Java Basics

Starting Quiz on: Java Basics
1. What is JVM?
   1) Java Virtual Machine
   2) Java Voice Manager
   3) Java Version Mode
Your answer: 1
→ Correct!

Rate your Experience between 1-5 = 5
→ Quiz Completed! Score: 5/5
→ Thank you for your feedback! 5⭐️

🔹 4 - Exit

Purpose: Exit the application.

Example:

Goodbye!


- Input is validated to ensure:
  - Number of options ≥ 2
  - Correct answer index is in range
  - Menu commands are valid integers

---

## 📂 Directory Structure

src/ ├── QuizApp.java ├── Quiz/ │ └── Quiz.java └── Question/ └── Question.java


---

## ✅ Summary Table

| Command | Description             | Input Required                       | Output                              |
|---------|-------------------------|--------------------------------------|-------------------------------------|
| 1       | Create a new quiz       | Topic name                           | "Quiz created successfully"         |
| 2       | Add questions to a quiz | Topic, question, options, correct    | "Question added to quiz"            |
| 3       | Take a quiz             | Topic name, answers, feedback        | Score & feedback                    |
| 4       | Exit the app            | None                                 | "Goodbye!"                          |

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages