Skip to content

Glossary: Software Design Patterns in C++

Has-a / is-a

Also written: has a, is a, is-a, has-a

Two kinds of relationship between classes. Is-a is inheritance, as a wholesale product is a product, and has-a is composition, as a product has a pricing rule.

Where the book teaches it

Related terms

CompositionInheritanceLiskov substitution principle