Skip to content

Glossary: Software Design Patterns

Composite

Also written: composite pattern

A pattern that gives a single item and a group the same method, so a group's method asks each part and adds up the answers. The nested `Bundle` and `Item` classes both have `price()`.

Where the book teaches it

Related terms

Tree