Arquivo da tag: Composition

Design Principle – Composition

Favor composition over inheritance.

Create system using composition gives you a lot more flexibility. Not only does it let you encapsulate a family of algorithms into their own set of classes, but it also lets you change behavior at runtime.

Enjoy
Marcos Carvalho