Creating Java classes from a UML diagram

I need to create java classes based on this UML diagram. The problem is that I do not know what the relationship is inside the red figure. I have done all other relationships between classes A, B, C, D, but I cannot figure it out.

Can anyone give me a hint?

So far I:

class A extends B

class D extends C

class C 
List<B> bElement;

class D 
List<A> aElement;

Thank.

enter image description here

+4
source share
2 answers

This means that the lower association is inherited from the upper. Just as the lower classes inherit from the upper.

The concept of connector inheritance was introduced only in the recent release of UML (according to @Henriette's answer from 2.0). In any case, neither the lower association nor its generalization are really needed, since in any case it is inherited along with both generalizations.

, , ( ).

P.S. , , p. 692:

UMLEdges modelElements, , UMLEdges ( AssociationClasses, ) modelElements.

+4

UML 2.0 2005 . UML, , - , , . , , , / , . , OWL 2, .

w.r.t. UML, , .

equivalent representations of inheritance of associations

, UML : association specialization, subsetting redefinition. , .

. A2 A1 (a). C3 C4 C1 C2. C1 C2 C3 C4.

C3/C4 C1/C2 (a), C1 C2 C3 C4. , C3 C4 C1 C2. , (a) : A1, C3 C4, A2. A2 - , , , A1 A2. , () - A2 , A1.

(b) , c4 {subsets c2}. , , C4, , C2. C3 C1. , , , .

Redefinition . C4 C2 (c). Redefinition , , .

, , , . (d) , , , .

enter image description here

(a) (d) . (A1/A2 MarriedTo/DivorceFrom) , , , .

: ( ) , .

+3

Source: https://habr.com/ru/post/1689856/


All Articles