0 votes
in JAVA by
Difference between Composition, Aggregation and Association in OOP?

1 Answer

0 votes
by
If two objects are related to each other, they are said to be associated with each other. Composition and Aggregation are two forms of association in object-oriented programming. The composition is stronger association than Aggregation. In Composition, one object is OWNER of another object while in Aggregation one object is just USER of another object. If an object A is composed of object B then B doesn't exist if A ceased to exists, but if object A is just an aggregation of object B then B can exists even if A ceased to exist.

Related questions

+1 vote
asked Jan 27, 2020 in JAVA by rahuljain1
0 votes
+2 votes
asked Jan 20, 2022 in JAVA by rajeshsharma
...