If the condition is in the uml class diagram?

If true, this attribute "true" does this operation otherwise does nothing.

How to show this in the uml class diagram.

Thanks Kim

+3
source share
3 answers

No. Class diagrams do not show behavior, but only structure. To show the behavior, you can use sequence diagrams, and it is shown that in the sequence diagram a rectangle is shown, which in the upper corner records the condition, and inside it describes the operation that occurs if the condition is true. You can read here for more information: http://en.wikipedia.org/wiki/Sequence_diagram

+8

, - . UML, ​​ .

. alt text

+3

I think you can just ignore the else part.
So just grab the if part using alt.

Take a look at Figure 8 in the example: http://www.ibm.com/developerworks/rational/library/3101.html

0
source

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


All Articles