954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How do I show a constant in an UML diagram?

Hi members, just a simple question, how would I show a constant in an UML diagram?

For example, here is a double field the class contains.
- radius : double

But how would the constant PI (3.14159...) be shown?
- PI : constant??

Future thanks for the responses!

DeGeeGin
Newbie Poster
24 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

Its like this

PI : double = 3.14159
niranga
Junior Poster
163 posts since Apr 2010
Reputation Points: 21
Solved Threads: 21
 

EDIT:

Sorry, above poster is correct. I changed my post to avoid confusion.

+PI: double = 3.141...
Syrne
Junior Poster
100 posts since Sep 2010
Reputation Points: 30
Solved Threads: 0
 

Oh yep. Syrne is correct. I forgot to put the access modifier.

niranga
Junior Poster
163 posts since Apr 2010
Reputation Points: 21
Solved Threads: 21
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: