Composition is a restricted form of aggregation in which two entities are highly dependent on each other.
It represents Part-Of relationship.
In composition, both the entities are dependent on each other.
When there is a composition between two entities, the composed object cannot exist without the other entity.
In the following example, a library can have a number of books on same or different subjects.
So, if a library gets destroyed then all books within that particular library will be destroyed; i.e., book can not exist without library.
That’s why it is composition.