Curriculum

Curriculum

Turn a Requirement into a Pass-or-Fail Check

Scenario

The booking program must decline requests when the requested time slot is already taken.

Selected choicePick a choice below
Result—

Try it yourself

Which check would catch a buggy program that says "Accepted" to every request?

Reveal the explanation
  1. The booking program works well

    Too vague — it has no specific input or expected output, so a broken program could still look fine.

  2. 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.