Turn a Requirement into a Pass-or-Fail Check
Scenario
The booking program must decline requests when the requested time slot is already taken.
Try it yourself
Which check would catch a buggy program that says "Accepted" to every request?
| Case | Result |
|---|---|
| The booking program works well | Select a choice above to see what happens. |
| Given an already-taken time slot, the program returns Declined | Select a choice above to see what happens. |
Reveal the explanation
- The booking program works well
Too vague — it has no specific input or expected output, so a broken program could still look fine.
- Given an already-taken time slot, the program returns Declined
Testable and exact — a buggy program that always accepts will immediately fail this check.
Write a second check for a free time slot. Together, both checks verify that the program can accept AND decline correctly.
Your turn
Write a check for a free slot. State the exact input state and the expected decision.
Common mistake Writing “works” without a verifiable outcome.
Check your work
A teammate can run the case and independently tell whether it passes.
This browser could not save your progress. Changes last until you leave the page.