Delegation: Handing the Job On
When every screen reaches through a rental to price its bike, a new rule such as a $2 helmet has to be added everywhere, and one place is missed; delegation gives the rental its own price() that hands the bike's part on to the bike, the move half the design patterns are built from.
Updated

- Category
- Data Structures
- Level
- Apprentice
- Tags
- Composition, coupling, c-sharp, Delegation, java, JavaScript, OOP, python, typescript