Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

depicting enumeration type in class diagram.

 
Pratik Das
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a class diagram, how do you associate an enumeration with a class which uses this enumeration member variable.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.Enum<E> is a class. You can use a box to represent the enum. You can add a stereotype to indicate that it is an Enum.


[ August 26, 2008: Message edited by: James Clark ]
 
Pratik Das
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks James. Do you mean it is a "uses" relationship?
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you are asking. In terms of the diagram the line from one box to the other is a symbol for an Association relationship.

In the UML there are three types of relationships:

1) Association

2) Composition

3) Aggregation


There is nothing in the UML called uses relationship.

Hope this helps.
[ August 27, 2008: Message edited by: James Clark ]
 
Pratik Das
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok so enumeration is a directed association. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic