Enumerating UML as a Return Type

<< enumeration>> E1 | .RED .GREEN .BLUE |

I got the above as an enumeration class in a UML diagram. I associate it with another class by saying House. I now need a Housesay method +getColor()that returns the color from the above listing.

How do I portray this in UML? it would be like this +getColor(): E1:?

+3
source share
1 answer

Yes, your suggestion is correct and depending on the level of detail you can also add a dependency on House to E1.

+1
source

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


All Articles