1

I need to design class diagram for flight management system, and I'm trying to figure out whether the relationship between flight instance and pilot should be association or aggregation.

I'm thinking it could be aggregation because a pilot is part of the flight, but I'm not sure if this is accurate.

Can you tell what solution would be best in this case?

enter image description here

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
Yeregb
  • 11
  • 1
  • https://stackoverflow.com/questions/9640885/uml-aggregation-vs-association#:~:text=Aggregation%20denotes%20whole%2Fpart%20%20relationships%20whereas%20associations%20do,relationship%20ought%20to%20be%20%20aggregation%20or%20association. – T McKeown Nov 11 '21 at 15:45
  • 2
    lean towards association and not worry about the semantics – T McKeown Nov 11 '21 at 15:47
  • Your diagram shows a shared aggregation. As per UML 2.5 p. 110 that has no pre-defined semamtics at all. – qwerty_so Nov 11 '21 at 15:56

0 Answers0