How do I represent an enumeration in UML, specifically using rational Rose?
tia
How do I represent an enumeration in UML, specifically using rational Rose?
tia
I believe that it would look something similar to this:
The property-list being {Yes, No}.Code:__________________________________________ | SampleClass | |__________________________________________| | | | +sampleEnum : SampleEnum = Yes {Yes, No} | |__________________________________________| |__________________________________________|
David
Last edited by Strider; 07-02-2002 at 12:53 PM.
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
So that would be equivalent to:
would it? And defined as a member of a class? At the moment I have this (see below) but I'm not sure how it fits together in UML (my book uses Java )Code:enum SampleEnum { yes, no };
thx for the help, much appreciatedCode:enum SEX { MALE, FEMALE }; class Student { public: //stuff private: //some data members + SEX sex; };
Last edited by endo; 07-03-2002 at 03:50 PM.
Just make sure that you can tell that the data type is enum but listing all the enumerations is a good ideas if they will fit. You could also attach a note icon.
The format is as follows:
<name> : <type> = <default> {<parameter list, ...>}
so...
would look similar to this:Code:enum SEX { MALE, FEMALE }; class Student { public: //stuff private: //some data members + SEX sex; };
DavidCode:__________________________________ | Student | |__________________________________| | | | +sex : SEX = MALE {MALE, FEMALE} | |__________________________________| |__________________________________|
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.