Decorator Pattern — Adding Behavior Dynamically
Master the Decorator Pattern — learn how to attach new responsibilities to objects dynamically by wrapping them in decorator layers, providing a flexible alternative to subclassing for extending behavior.