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.
- 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.
- Java 8 or higher
- Spring Boot
- Maven or Gradle
- Postman ( for API testing )
-
Clone the repository:
git clone https://github.com/IT21826740/Java-quiz-app.git cd Java-quiz-app
-
Build the project:
./mvn clean install
-
Run the application:
./mvn spring-boot:run
-
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'. ====================================
- Start the application as mentioned above.
- Open Postman and send a
GET
request to the following endpoint:This will return a list of quiz questions in JSON format.http://localhost:7575/questions
[
{ "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" }
]
If you don't know how to use the terminal or Postman, are you even a software engineer? 😉
Enjoy the quiz and see how many questions you can get right.😊
-- LEARN SPRINGBOOT & JAVA 2024@DIL --