UML relationship between classes..query
i have a GUI class and it uses lots of other classes by creating objects to those classes. I am not inheriting anything. I just create objects to various classes from other assemblies and use the methods and properties from those classes. In UML i drew all the class block diagrams. Now how to connect all those classes with the Ma开发者_JAVA技巧in GUI rendering class? Is this composition ?
Thanks.
So it is a has-a relation. The GUI aggregates those classes.
So either aggregation or composition (later one is stronger).
See also: http://en.wikipedia.org/wiki/Class_diagram
hth
Mario
If the GUI is composed of other classes then its composition.
精彩评论