Book a Demo

Author Topic: Representing Enums in Class Diagram  (Read 5611 times)

Tryst

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Representing Enums in Class Diagram
« on: January 06, 2008, 12:44:51 pm »
Hi all,

my application contains several Enums where these types of these Enums will be set as attributes on a Class. How exactly do you represent an Enum on a Class diagram?

Thanks
Tryst

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Representing Enums in Class Diagram
« Reply #1 on: January 06, 2008, 01:59:02 pm »
Use the Enumeration element from the Class diagram toolbox. The attributes are the allowable values from the Enumeration. You can assign them data types if you need to specify these.

Now you can create an attribute of a class, and set the type of the attribute to your enumeration.

David
No, you can't have it!

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Representing Enums in Class Diagram
« Reply #2 on: January 07, 2008, 06:41:34 am »
Or manually set stereotype <<enumeration>> to your class and <<enum>> to your attributes.
Jan 'Bary' Glas