I read a lot of documents about relationships in the class diagram but I'm still hesitant about some relationships.
- My first question is to identify the type of below relationship :
as you could see in the above image I have NetworkAgent class which includes NetworkUDPReceiver for listening and receiving and NetworkUDPSender for sending packets.
I know Aggregation is a whole-part structure as parts could be shareable and Association used when a class has a reference to another class as a member in the non-whole-part structure.
in the above example, I see a whole-part structure and shareable parts. does my opinion is right? do you see Aggregation?
- My second and more important question is what would happen if I choose the wrong relationship? I know the right answer may depend on my application or problem concept.
For example, if the correct answer is Association, what would happen, or what are the consequences if I choose Aggregation incorrectly? (and vice versa)
update question: Bruno correctly informs me the position of aggregation sign <> on the above image is incorrect and should be reversed.
