# Is-a vs Has-a

A quick test: "is-a" suggests inheritance, "has-a" suggests composition.

## What is **Is-a vs Has-a**?

**Is-a vs has-a** is a quick test for picking inheritance or composition. A dog *is an* animal, so inheritance fits. A car *has an* engine, so composition fits.

Level: Journeyman · [More OOP terms at this level](https://www.ask-codey.com/glossary/subjects/oop/journeyman)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/is-a-vs-has-a
