Skip to content

Glossary: Software Design Patterns

Composition

Also written: has-a composition

Building an object from smaller part objects it holds and hands work to, instead of inheriting. A `Product` has a pricing part and a wrapping part.

Where the book teaches it

Related terms

DelegationHas-a / is-aInheritance