This project provides a role-based experience for managing and participating in quizzes. It supports two user roles: Admin and Student, offering tailored functionality to create and take quizzes effectively. The system uses JSON for data storage and ensures an interactive and streamlined experience.
- Basic understanding of Java programming language.
- Java Development Kit (JDK) installed on your machine.
- A text editor or IDE (e.g., IntelliJ IDEA, Eclipse, or VS Code).
Files:
users.json: Contains the login credentials and roles for both admin and students.quiz.json: Stores the questions, options, and answer keys added by the admin.
- Login: Admin can log in using their credentials.
- Question Management:
- Create multiple MCQs with 4 options and an answer key.
- Questions are stored in a
quiz.jsonfile. - Add new questions continuously until pressing 'q' to quit.
-
Login: Students log in using their credentials.
-
Take Quiz:
- The system randomly selects 10 questions from the question bank stored in
quiz.json. - Students answer MCQs interactively.
- Once 10 questions are done, Again ask if they want to continue the quiz until the student presses 'q' to stop after 10 questions.
- The system randomly selects 10 questions from the question bank stored in
-
Result Evaluation:
- After completing the quiz, the system evaluates the answers.
- Displays the result based on the number of correct answers.
-
Result Criteria with Feedback:
- 8-10 marks: Excellent!
- 6-7 marks: Good.
- 3-5 marks: Very poor.
- 0-2 marks: Very sorry, you are failed.
-
- clone this project
https://github.com/rashadkhan97/Java-Quiz-Project.git - Ensure
users.jsonandquiz.jsonare in the same directory as your Java program. - Run the program using your preferred IDE or the terminal.
- Log in using the credentials from
users.jsonfile where (username:admin, password:1234). - Add questions with prompts.
- Once done a message will appear - "Saved successfully! Do you want to add more questions? (press s for start and q for quit)"
adminDashboard.mp4
- Log in using the credentials from
users.jsonfile where (username:rashad, password:1234). - Start the quiz by pressing
's'when prompted. - Answer the questions interactively.
- View the result after completing the quiz.