Search code examples
classumlclass-diagram

uml multiple relationships between classes in class diagram?


What is meant by the four arrows between the following two classes? Is there a way i can represent this as one arrow instead? This picture is from a class diagram generated from net beans. But i don't quite understand it.

Basically there are two separate dependency arrows between the two classes and two other lines as well. I just want help in understanding what this means.

https://i.sstatic.net/R1fUf.png


Solution

  • I do not understand all this picture...

    Firstly, uou have two Dependencies (the arrows with a dashed line). This is allowed by UML but they have been created in both direction which means taht both classes depend of each other... These dependencies also have multiplicities 1..1 which is not allowed by UML so the mean of this...

    Secondly you have two Agregations (the arrows with a with rectangle at one end). These means that the MarketSubCategory is always composed of 1 MarketCategory and taht the MarketCaterory is composed of 0..* MarketSubCategory. The fact that these Aggretations have names made me think that maybe the aggregation is not wrong here. These Classes do they really have a composition relationship between them? If not these Aggregation should be replaced by a unique Association...