Is it recommended to make associations to enum classes in uml class diagram?

Regardless of whether the attribute type is an enum, there are two ways to represent attributes in UML: as proper attributes, and as directed associations The two styles of attribute declarations are semantically equivalent: they mean exactly the same thing. In other words, which one you choose comes down to a matter of style Using attributes makes for a simpler diagram, and in some tools is required in order for the attribute to be visible in the tree view of the model Using directed associations means you must include the target type (the enum) in the diagram, which means you can see the literals. Of course, you can include it in the other case too, as I've done with An_Enum above I don't normally use aggregations or compositions for code-level modeling; I feel they're better suited for describing more abstract relationships between classes (as in an information model) and conceptually they don't really match anything in source code.

Attributes do, possibly supplemented by "dependency" or "use" relationships to classes which are used as local variable types or whose methods are called.

Regardless of whether the attribute type is an enum, there are two ways to represent attributes in UML: as proper attributes, and as directed associations. The two styles of attribute declarations are semantically equivalent: they mean exactly the same thing. In other words, which one you choose comes down to a matter of style.

Using attributes makes for a simpler diagram, and in some tools is required in order for the attribute to be visible in the tree view of the model. Using directed associations means you must include the target type (the enum) in the diagram, which means you can see the literals. Of course, you can include it in the other case too, as I've done with An_Enum above.

I don't normally use aggregations or compositions for code-level modeling; I feel they're better suited for describing more abstract relationships between classes (as in an information model) and conceptually they don't really match anything in source code. Attributes do, possibly supplemented by "dependency" or "use" relationships to classes which are used as local variable types or whose methods are called.

A simple association would do the trick. Aggregation shows that the life cycle of the contained class is tied to the containing class. From wikipedia: Aggregation can occur when a class is a collection or container of other classes, but where the contained classes do not have a strong life cycle dependency on the container—essentially, if the container is destroyed, its contents are not.

en.wikipedia.org/wiki/Class_diagram#Aggr... Also, found this for you: Uml class diagram enum.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions