工厂方法UML图澄清
我正在经历此处描述的工厂方法模式。我不太明白从 Application
到 Document
以及从 MyApplication
到 MyDocument
标记的箭头的含义。谁能帮助我理解这个符号。
I was going through the factory method pattern describe here. I didn't quite get the meaning of the arrows marked from Application
to Document
and from MyApplication
to MyDocument
. Can anyone help to me to understand this notation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Application
和Document
之间的关系是一个聚合。这意味着应用程序
(整体)包含文档
(部分)。MyApplication
和MyDocument
之间的关系是依赖。这意味着当MyDocument改变时,MyApplication也可能改变。在这种情况下,它是一个 <>依赖关系,即MyApplication
使用MyDocument
The relation between
Application
andDocument
is an Aggregation. It means that anApplication
(Whole) containsDocuments
(Parts).The relation between
MyApplication
andMyDocument
is a Dependency. It means that MyApplication may change when MyDocument changes. In this case it is a <> Dependency, i.e.MyApplication
usesMyDocument