Curriculum

Curriculum

Separate the Rule from the Screen Design

Scenario

A team writes down three notes for a room-booking feature. Some notes define the decision rule, and some only describe how the screen looks.

Card3
Core Rule0
Screen Detail0

Try it yourself

Sort each note into Core Rule or Screen Detail.

Reveal the explanation
  1. Decline room booking when freeSeats is 0

    Core Rule · This logic decides the answer in any interface or programming language.

  2. Show the confirmation banner at the top of the screen

    Screen Detail · Where a banner appears changes the layout, not the booking decision.

  3. Require an active student card for evening study rooms

    Core Rule · This condition changes whether a booking is accepted or declined.

Keeping the core rule separate from screen layout lets you test the rule with plain inputs and implement it in Python, JavaScript, or Go without rebuilding any UI.

Your turn

From a library checkout note, separate "max 3 borrowed books" and "highlight overdue count in bold text" into rule vs. screen detail.

Common mistake Mixing colors or button labels into the acceptance criteria of a calculation function.

Check your work

The 3-book limit is marked as a core rule; bold text styling is marked as a screen detail.

Quick check

Why should the quiz passing rule (score >= 60) be written independently of the screen design?
Show the answer and reasoning

Correct answer So the same rule and test cases work in any language or interface

Separating logic from presentation allows identical deterministic tests across CLI, web, Python, JS, and Go.