Compare the differences between Composition, aggregation and association in OOPS.
Inheritance: It is a relationship with a class and the relationship is IS-Aexample: Audi IS-A Car
Association: It is a relationship with a class and the relationship is HAS-Aexamples:Employee HAS-A EmployerIDDetailsEmployee HAS-A ContactInformation
Aggregation: It is a type of association. The relationship between the class is HAS-A. Existance of both the class does not depend on each other.example:Employee HAS-A ContactInformation
if there is no Employee class still you can use ContactInformation class for other classes like Student, Customer etc
Composition: It is a type of association. The relationship between the class is HAS-A. Existance of one of the class depend on the other.example:Employee HAS-A EmployerIDDetails
if there is no Employee class then you cannot use EmployerIDDetails with any thing else