I can't decide how to show constant class properties in Uml Diagram. Can you suggest me how to do it?
Class (i.e. static) methods and fields are indicated by underlining. Constant (i.e. final) fields are indicated via naming convention: constants should be in ALL_CAPS.
A constant is a minor implementation detail and logically, it is not a member of the class, it bears no meaning in the OO view of things. So the answer is "you don't". Show activity on this post. The notion of a constant in UML exists, but it's usually inside a class and has a type.
The UML denotes static features by underlining them. The static keyword may modify attributes and operations alike, and is independent of other modifiers such as public or private .
In domain modeling class diagrams, an implements relationship represents a class that implements the operations in a Java™ interface. As the following figure illustrates, an implements relationship is displayed as a dashed line with an unfilled arrowhead.
I would do it like this:
CONSTANT_NAME : constant_type = value
E. g.:
PI : double = 3.1415
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With