Curriculum

Curriculum

Write a Concrete Example You Can Check by Hand

Scenario

Room A is free at 14:00. Sam asks to book Room A at 14:00.

  1. 1Write down the request
  2. 2Check that exact slot in the schedule
  3. 3Write down the expected result

Try it yourself

Predict the result before stepping through the example.

Reveal the explanation
  1. Write down the request

    Room A at 14:00.

  2. Check that exact slot in the schedule

    Room A at 14:00 is free.

  3. Write down the expected result

    Accept the booking.

Now repeat the same example with Room A marked occupied. Only the room status changes, so the expected decision must flip to Declined.

Your turn

Write a request for the same slot once when it is free and once when occupied.

Common mistake Leaving out the initial schedule state.

Check your work

Two input–result pairs differ only in slot availability and have opposite decisions.