开发者

UML relationship between classes..query

开发者 https://www.devze.com 2023-03-01 03:13 出处:网络
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 meth

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消