Skip to content

Instantly share code, notes, and snippets.

@AbduvaliMamatov
Last active July 10, 2025 03:32
Show Gist options
  • Select an option

  • Save AbduvaliMamatov/a24708014d1e3db6a99268144555a1ee to your computer and use it in GitHub Desktop.

Select an option

Save AbduvaliMamatov/a24708014d1e3db6a99268144555a1ee to your computer and use it in GitHub Desktop.
QuizApp Application.md

13 End-to-End I/O Examples

The following transcripts demonstrate every realistic branch the user can take in Teacher and Student modes, including success paths, validation errors, confirmation prompts, disabled quizzes, time-limited questions, half credit, and “no active quiz” handling.

All prompts are powered by Spectre.Console components (shown in bold).

13.1 Teacher Mode – Full Cycle

A. Create a New Quiz
  • User opens quiz builder
  • Adds questions
  • Saves to file
B. Validation Error — Duplicate MCQ Option Key
  • Example of user adding the same answer key twice
  • System prompts validation message
C. Overwrite Existing Quiz — Decline
  • System detects existing quiz
  • User declines to overwrite
D. Manage Quizzes — Disable, Enable, Delete
  • Show how quizzes can be toggled or removed

13.2 Student Mode – Full Cycle

E. No Active Quizzes
  • User attempts to take a quiz but none are enabled
F. Take Quiz — Mixed Results + Time Limit Scenarios
  • Simulate user answering some correctly, some wrong
  • Timer runs out for one question
G. Invalid Selection Key (Prevented by UI)
  • User tries to select an invalid option
  • App blocks and shows warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment