Composition and aggregation in class diagram

It's hard for me to understand this when it comes to developing a class diagram, from what I know is a has-a relationship, but Aggregation? I have no idea what that is. and one, when will I know how to use composition in a class diagram? and when will I know how to use aggregation in a class diagram? An example would be much appreciated.

+5
source share
2 answers

The main difference between aggregation and composition is the property of your has-a relationship. It is either strong or weak.

"-" " ". , - . . , , , , .

"has-a" " ". , . "". . , .

, , , .

+21

. , .

Aggregation. , . , . , , (. ).

, (. 1- ). , , .

.

. , , . , . , , .. - . , , . - . , Aggregation.

0

All Articles