Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+34 votes

What are the differences between those two in regards to UML diagrams?

asked in CSC285_Fall2018 by (8 points)

2 Answers

+13 votes

Aggregation (and composition) are both special types of association that involves a kind of "part/whole" relationship... for example, if one class conceptually is made up of several pieces that are each represented by other classes.

See: https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-aggregation-vs-composition/

answered by (186 points)
+3 votes

i believe an association is similar to inheritance, and aggregation is when one class interacts with another like we talked about on the CRC cards in the collaboration section.

answered by (8 points)

No, association is not similar to inheritance. Inheritance in UML is done by a generalization arrow.