UML enumeration and class - how to connect
I'm trying to build a game in XNA (Space Invaders), but first I want to model it. I am using modeling in Visual Studio 2010. I first made a class called Invaders, and then an enumeration called InvaderType. Class Invader will use InvaderType so that each object coming from invader will be a specific InvaderType.
The thing I wanted to know is what to use 开发者_JAVA技巧to connect these two? The ones that seem logical are the association, composition, dependency, or connector. And when making a connection, should the class not automatically get the Enum type in its Attributes?
I´d just define an attribute "type" in class Invaders and indicate that the type of the "type" attribute is InvaderType
精彩评论