Skip to content

Glossary: Software Design Patterns in C++

Composite

Also written: composite pattern

A pattern that gives a single item and a group the same method, so the group asks each part and adds up. A gift bundle can hold items and other bundles, and one `price()` call prices any of them.

Where the book teaches it

Related terms

TreeStructural pattern