开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜