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.
The main difference between aggregation and composition is the property of your has-a relationship. It is either strong or weak.
"-" " ". , - . . , , , , .
"has-a" " ". , . "". . , .
, , , .
. , .
Aggregation. , . , . , , (. ).
, (. 1- ). , , .
.
. , , . , . , , .. - . , , . - . , Aggregation.