Glossary: Software Design Patterns in Java
Has-a / is-a
Also written: has-a, is-a, is a, has a
Composition says a product has a pricing rule; inheritance says a wholesale product is a product. Choose inheritance only when the child truly is a kind of the parent.