Strategy doesn't delete your if. It moves it.
transcript
Here's a myth you'll hear about design patterns. They delete your if statements. They don't. They move them.
Before the refactor, the checkout asks one question. Which plan is this? It asks on every single order. So it knows every rule, by name. A new rule means editing it.
After, the choice happens once. At the edge. A registry turns the plan name into a policy. The checkout gets that policy. It never asks again. It just calls fee.
Add a rain fee? One new class, and one new line in the registry. Lines of the checkout edited? Zero. And the choice is made once per checkout. Not once per order.
In the interview, don't claim nothing changes. Say one registry line changes. The pricing code stays shut.
The decision didn't vanish. It moved to one place, at the edge. And it runs once, not on every order.
Full breakdown in the lecture.