UML Class diagram object composed of 4 objects of another class? -
i have 1 object, call type has 4 data members of object type, call b. how show in uml class diagram clear there 4 b objects type in every object?
is solution put "4" next arrow head pointing class b?
it depends on want achive, in sense of how need distinguish between objects in context of association/link, - what kind of role play:
- if there equal, no special differences in role in context of a, them multiplicity 4..4 job, naming association end (for example my_bs)
- if these object play different role in connection a, can use separate associations lower multiplicities each one, 2, 3 or 4 pieces (for example, if b wheel , car, can put 2 associations multiplicities 2..2 each, , call "front" , "rear", or 4 associations "front_left", "front_right"...)
here how both cases like. on second 1 showd different possible options (with max. 5 elements of b), give idea.
it's clear now, fundamental concept here role of association end.
Comments
Post a Comment