UML enumeration as a return type
<< enumeration>> E1 | .RED .GREEN .BLUE |
I have the above as an enumeration class in a UML diagram. I associate it开发者_开发问答 with another class say House
. I now need a method on House
say +getColor()
which returns a color from the above enumeration.
How would I depict this in UML?
would it be like : +getColor(): E1
?
Yes, your suggestion is right and depending on the level of detail, you could also add dependency from House to E1.
精彩评论