- Less coupling between classes. Using inheritance, subclasses easily make assumptions, and break LSP.
- Test for LSP (substitutability) to decide when to inherit.
- Compose when there is a "has a" (or "uses a") relationship, inherit when "is a".
Composition Over Inheritance Principle
![](https://media.dev.to/cdn-cgi/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1173572%2F559076dd-fc31-431a-bd48-19ed5af74573.jpeg)