https://github.com/it21826740/java-quiz-application
This simple quiz app is built using Java Spring Boot and offers a fun, interactive way to test your knowledge with multiple-choice questions.
https://github.com/it21826740/java-quiz-application
getmapping java restful-api spring-boot
Last synced: 16 days ago
JSON representation
This simple quiz app is built using Java Spring Boot and offers a fun, interactive way to test your knowledge with multiple-choice questions.
- Host: GitHub
- URL: https://github.com/it21826740/java-quiz-application
- Owner: IT21826740
- Created: 2024-11-29T13:49:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-06T04:45:51.000Z (over 1 year ago)
- Last Synced: 2025-07-23T03:32:59.547Z (10 months ago)
- Topics: getmapping, java, restful-api, spring-boot
- Language: Java
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Quiz Application
Welcome to the **Java Quiz Application**! This simple quiz app is built using Java Spring Boot and offers a fun, interactive way to test your knowledge with multiple-choice questions.
## Features
- Accepts answers in the form of single characters: A, B, C, D.
- Option to exit the quiz anytime by typing `*`.
- Real-time feedback on answers.
- Summary of your score at the end of the quiz.
## Requirements
- Java 8 or higher
- Spring Boot
- Maven or Gradle
- Postman ( for API testing )
## How to Run the Application
### Using the Terminal
1. **Clone the repository:**
```bash
git clone https://github.com/IT21826740/Java-quiz-app.git
cd Java-quiz-app
```
2. **Build the project:**
```bash
./mvn clean install
```
3. **Run the application:**
```bash
./mvn spring-boot:run
```
4. The application will start on port `7575`. You should see the following message in the terminal:
```
Welcome to the Java Quiz!
====================================
Instructions:
1. You will be asked a series of questions.
2. Enter the letter (A, B, C, or D) that corresponds to your answer.
3. To exit the quiz at any time, type '*'.
4. Only valid inputs are 'A', 'B', 'C', or 'D'.
====================================
```
### Using Postman
1. **Start the application** as mentioned above.
2. Open **Postman** and send a `GET` request to the following endpoint:
```
http://localhost:7575/questions
```
This will return a list of quiz questions in JSON format.
## Example API Response
```json
[
{ "question": "What is the default value of a boolean in Java?", "options": "A. true, B. false, C. null, D. 0" },
{ "question": "Which of the following is not a Java keyword?", "options": "A. static, B. new, C. goto, D. main" },
{ "question": "What is the size of an int in Java?", "options": "A. 16 bits, B. 32 bits, C. 64 bits, D. 8 bits" }
]
```
## Fun Fact
> **If you don't know how to use the terminal or Postman, are you even a software engineer?** 😉
## Thank You!
Enjoy the quiz and see how many questions you can get right.😊


-- LEARN SPRINGBOOT & JAVA 2024@DIL --