Project 2: Quizz it

Description:

The goal of this challenge is to build a terminal program you can use to challenge you knowledge about any topic.

Step 1: Build the main menu

User story:

As a user, I want to select an option from the main menu so that I can complete the selected action.

Acceptance criteria:

Given a user, when I enter an invalid option from the main menu then an error message is displayed “Please select a valid option”
Given a user, when I enter a valid option from the main menu then I am redirected to the selected sub menu.
Given a user, when I enter option 3 from the main menu then I am exiting the program.

Wireframes:

Main menu:
######### QUIZZ IT ##########

1 - Start to play
2 - Questions/Answers management
3 - Leave the game
Select a valid option to continue [1-3]: 

Step 2: Create the sub menu for Questions/Answers Management

User story:

As a user I want to select an option from the questions/answers menu so that I can complete the selected action.

Acceptance criteria:

Given a user on the q/a menu, when I enter an invalid option from the main menu then an error message is displayed “Please select a valid option”
Given a user on the q/a menu, when I enter a valid option from the main menu then I am redirected to the selected sub menu.
Given a user, when I enter option 4 from the main menu then I am exiting the program.

Wireframes:

######### QUIZZ IT: Questions/Answers management ##########

0 - Print all questions
1 - Create a new question with answers
2 - Update a pair question answers
3 - Delete a question
4 - Go back to main menu
Select a valid option to continue [0-4]:

Step 3: Create the feature “Create the question”

User story:

As a user I want to add a new question with 4 answers so that I have one more question to play.

Acceptance criteria:

Given a user on the “Create the question” screen, when I enter valid values for Question, Category and Answers (at least one right), then a message is displayed at the end of the screen “!! Your question has been added to the collection of questions.”

Given a user on the “Create the question” screen, when I enter option y then the system ask me to enter the information for a new question.

Given a user on the “Create the question” screen, when I enter option n then the system redirects me back to q/a menu.

Wireframes:

Questions/Answers Management menu:
####### QUIZZ IT: Create a new question with answers ########

Question: <user-input>
Category: <user-input>
Level [easy, medium, advanced]:
Answer A:
Right answer [yes/no]?
Answer B:
Right answer [yes/no]?
Answer C:
Right answer [yes/no]?
Answer D:
Right answer [yes/no]?

!! Your question has been added to the collection of question.

Do you want to add another question [y/n]?

Step 4: Print the questions

User story:

As a user of the QUIZZ IT application,
I want to print or display all quiz questions with their corresponding answers in a structured table format,
so that I can easily review, share, or verify the list of questions and answers outside the app interface.

Acceptance criteria:

Given a user on the menu questions/answers when the user selects the option “Print Questions”, then the system displays all stored quiz questions in a tabular format with these headers:
Index | Question | Answer A | Answer B | Answer C | Answer D

Given the user on the menu questions/answers when the user selects the option “Print Questions” and there are no questions saved yet, then the system displays the message “There are no questions saved yet. Please add one.”

Given the user on the “Print Questions” screen, when the user press the key ENTER, then the user is redirected to the menu questions/answers.

Wireframes:

####### QUIZZ IT: Print questions ########

Index | Question | Answer A | Answer B | Answer C | Answer D
..... | ........ | ........ | ........ | ........ | ........
..... | ........ | ........ | ........ | ........ | ........

Press enter to come back to the question/answers menu

Step 5: Delete a question

User story:

As a user, I want to delete a question so that the question is not asked again in the quizz.

Acceptance criteria:

Given a user on the Delete a question screen, when the user enters an invalid or non-existent index, then the system displays an error message and prompts the user to try again.

Given a user on the Delete a question screen, when the selected question is successfully deleted, then the system displays the confirmation message:
“!! The question has been deleted !!”

Given a user on the Delete a question confirmation screen, when the user presses Enter, then the system continues to the next step or menu.

Given a user on the Delete a question confirmation screen, when the user presses Escape, then the system returns to the previous menu without performing any further actions.

Given a user on the Delete a question screen, when there are no questions available to delete, then the system displays the message “No questions available” and returns to the previous menu after the user presses Enter.

Wireframes:

Delete a question:
####### QUIZZ IT: Delete a question ########

Press enter to keep the existing value else modify it and press enter

Select a question by index: <user-input>

!! The question has been deleted !!

Press Enter to continue or Escape to go back to the previous menu:

Step 6: Update a question

User story:

As a user, I want to update a question so that the updated version of the question will be used in the quizz.

Acceptance criteria:

Given a user on the Update a question with answers screen, when the system prompts the user to select a question by index and the user enters a valid index, then the system displays the selected question with its current values for editing.

Given a user on the Update a question with answers screen, when the user presses Enter without typing anything in a field, then the system keeps the existing value for that field.

Given a user on the Update a question with answers screen, when the user enters a new value for any field and presses Enter, then the system replaces the existing value with the new one.

Given a user on the Update a question with answers screen, when the user updates the question text, category, level, or any of the answers, then the system must validate that all required fields remain filled and that at least one answer is marked as correct.

Given a user on the Update a question with answers screen, when all modifications are complete and valid, then the system displays the confirmation message:
“!! Your question has been updated !!”

Given a user on the Update a question with answers screen, when the user enters an invalid question index, then the system displays an error message and prompts the user to select a valid question.

Given a user on the Update a question with answers screen, when there are no questions available to update, then the system displays the message “No questions available” and returns the user to the previous menu after pressing Enter.

Wireframes:

Update a question with answers:
####### QUIZZ IT: Update a question with answers ########

Press enter to keep the existing value else modify it and press enter

Select a question by index:

Question [current value]: <user-input>
Category [current value]: <user-input>
Level [current value]:
Answer A [current value]:
Right answer [current value]?
Answer B [current value]:
Right answer [current value]?
Answer C [current value]:
Right answer [current value]?
Answer D [current value]:
Right answer [current value]?

!! Your question has been updated !!

Step 7: Before playing

User story:

As a user of the QUIZZ IT,
I want to select the difficulty level and question category before starting the quiz,
so that I can customize the gameplay experience according to my preferences and skill level.

Acceptance criteria:

Given a user on the Before Playing screen, when the system prompts “Select your level [Easy, Medium, Advanced]:” and the user enters a valid option, then the system stores the selected difficulty level for the quiz session.

Given a user on the Before Playing screen, when the system prompts “Select your level [Easy, Medium, Advanced]:” and the user enters an invalid value, then the system displays an error message and re-prompts the user to enter a valid level.

Given a user on the Before Playing screen, when the system prompts “Select the question category [language, programming, ai, all]:” and the user enters a valid category, then the system stores the selected category for the upcoming quiz.

Given a user on the Before Playing screen, when the user enters an invalid category, then the system displays an error message and re-prompts the user to enter a valid category.

Given a user on the Before Playing screen, when both level and category have been successfully selected, then the system displays the message “Press Enter to start.”

Given a user on the Before Playing screen, when the user presses Enter after both selections are valid, then the system starts the quiz using the chosen level and category settings.

Given a user on the Before Playing screen, when the user has not yet entered valid selections for both level and category, then pressing Enter does not start the quiz and the system continues to prompt for the missing inputs.

Wireframes:

######### QUIZZ IT: Before playing ##########

Select your level [Easy, Medium, Advanced]:
Select the question category [language, programming, ai, all]:
Press Enter to start:

Step 8: Play screen

When the user press enter, it is redirected to the Play screen

User story:

As a player of the QUIZZ IT application,
I want to answer quiz questions one by one, choosing from multiple-choice answers,
so that I can test my knowledge and see how many correct answers I can get in a row.

Acceptance criteria:

Given a user on the Play screen, when the game starts, then the system displays an introductory message:
“Let’s see how many correct answers you can answer in a row!”

Given a user on the Play screen, when the system presents a question, then it must show:

  • The question number and text
  • Four possible answers labeled A, B, C, and D
  • A prompt: “Select your answer [A–D]:”

Given a user on the Play screen, when the user selects a valid answer (A, B, C, or D), then the system must check if the answer is correct or incorrect.

Given a user on the Play screen, when the user enters an invalid option (not A–D), then the system displays an error message and re-prompts the user to select a valid answer.

Given a user on the Play screen, when the answer is correct, then the system increments the current score or streak counter and proceeds to the next question.

Given a user on the Play screen, when the answer is incorrect, then the system resets or ends the current streak and displays feedback (e.g., the correct answer or a message indicating the answer was wrong).

Given a user on the Play screen, when there are no more questions available, then the system displays a completion message and returns to the main menu or results screen.

Wireframes:

First screen example:
######### QUIZZ IT: Play ##########

Let's see how much correct answer you can answer in a row!

--------------------

1) What is a "tigre" in French?

A) tiger
B) cow
C) tigreux
D) tigro

Select your answer [A-D]:
Second screen example:
######### QUIZZ IT: Play ##########

Let's see how much correct answer you can answer in a row!

--------------------
✅ Great answer!

2) What is a "lion" in French?

A) lion
B) leon
C) laion
D) layon

Select your answer [A-D]:

Step 10: End screen

User story:

As a player of the QUIZZ IT application,
I want to see my final score and a summary of my answers after finishing the quiz,
so that I can review my performance and learn from my mistakes.

Acceptance criteria:

Given a user on the End Screen, when the quiz is completed, then the system displays the message:
“Thanks for playing!”

Given a user on the End Screen, when the game ends, then the system shows the total score in the format:
“You scored: <score>”

Given a user on the End Screen, when the score is displayed, then the system must also present a debriefing section titled:
“Here a debriefing of your answers:”

Given a user on the End Screen, when the debriefing is shown, then the system must list each question answered during the game in order, showing:

  • A ✅ mark for correct answers
  • A ⭕ mark for incorrect answers
  • The question text
  • The user’s selected answer
  • The correct answer (if the user was wrong)

Given a user on the End Screen, when a question was answered correctly, then the system displays the ✅ icon next to it.

Given a user on the End Screen, when a question was answered incorrectly, then the system displays the ⭕ icon and indicates the correct answer.

Given a user on the End Screen, when the debriefing and score are displayed, then the system must wait for the user’s next action (e.g., pressing Enter or Escape) to return to the main menu or exit the game.

Wireframes:

######### QUIZZ IT: End Screen ##########

Thanks for playing!
--------------------

You scored: 10

Here a debriefing of your answers:
✅ 1) What is a "tigre" in French? A) Tiger
⭕ 2) What is a "lion" in French? B) leon; Correct: A) lion 

Learning Objectives:

  • Data structures
  • Functions
  • User stories and acceptance criteria (Agile method)
  • MCV Architecture
  • Use a third party library

Difficulty Level: Beginner 🟢

Once the project is completed, send it to me for a project review!

Comments are closed.