Questions about UML class diagrams?

Hello, I have a few questions about UML class diagrams, any help would be appreciated

1) How do you show pointers in attributes?

2) What is multiplicity?

3) In what direction should the composition arrows be?

4) How did you place the listings?

+2
source share
2 answers

According to the current UML 2.4.1 standard and the following 2.5 (it differs almost only in simpler documentation):

  • / () . , , - , . , . ! , , ,

  • A B A B. , /instanc (es) A โ€‹โ€‹ / B. . , , .
  • , , A (-) B , B (-) A, ONE-. , B, (b- > a), .
  • , A B, .
  • , . .
  • , . ! : . . . .

example Class diagram


  • .
    • : , .
    • : A A-B , A , B A. 0 1 B. .
  • , .

, , . , "" 2.5 UML-. , .

  • .

    • "", , . , , . , , " " , , "". , , . , . .
    • ? , , ( ). , .
    • "" " ". . , , composition, shared none, . - .
  • - , @MagicMan . . Java (, ), , , ( ) .

:

, - . , , NO ().

++ A B , . UML, , .

+1

1) (): ---->, , -, , : ---->*

2) - , , (0..1), .. , , 0 1

3) : Container<>-----Child

4) :

_______________________
|   <<enumeration>>   |
|       Colors        |
|_____________________|
| Red                 |
| Green               |
| Blue                |
| ...                 |
|_____________________|

- UML:

0

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


All Articles