Single responsibility: placing an order
Split a class along its reasons to change, so each change touches one small piece.
Level Intermediate
What you will see
- One order, five jobs
- Prices and words in one loop
- One class per reason to change
- The orchestrator keeps the order
- When not to split
Before / after
Base: single-responsibility-base-tsView the diff