checks: 0
WITHOUT Null Object Β· lookup may return null latte Β· $10.00
Checkout code one line
Checkout lane
swipe a card…
lookupCustomer(card) β†’
$10.00β†’β€”
πŸ’₯ NullPointerException
One line, two kinds of customer
Swipe πŸ’³ Member card, then πŸͺͺ No card, and watch what null does to the chain.
β–Έ The code line never changes between worlds β€” only what lookupCustomer returns does.