对象图和类图有什么区别?
“类图”和“对象图”的含义有区别吗?
Is there a difference in the meaning of "class diagram" and "object graph"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
“类图”和“对象图”的含义有区别吗?
Is there a difference in the meaning of "class diagram" and "object graph"?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
看这个教程
http://www.cs.toronto.edu/~jm/340S /Slides6/ClassD.pdf
对象图包含类的一个实例的值,请参阅示例视图 它是对象系统在特定时间点的视图,
而
类图为wiki
参见进一步
see this tutorial
http://www.cs.toronto.edu/~jm/340S/Slides6/ClassD.pdf
Object graph contains value of one instance of class see example View its a view of an object system at a particular point in time
while
class diagram as wiki
see further
我同意上一篇文章,但想补充一点,类图是基于 UML 的,UML 是一种由 OMG 赞助的认可语言,拥有超过 500 万用户。因此,UML 是一种基于模型的标准,您可以从中获取视图。
在 UML 2 中,如果与 Java 一起使用,类图非常棒,因为在我看来,新规范与 java 项目具有完全相同的结构。它包括项目名称,包包括包含属性的分类器(例如类、接口、枚举)、包含属性的方法。
如果您必须只使用一张图,我会说使用类图。它很容易创建,因为您不需要了解 UML,并且可以将您的项目逆向工程为模型并获取类图视图。我的类图太神奇了:-)
I agree with the previous post but would like to add that a class diagram is based on UML which is an accredited language sponsored by the OMG and known by over 5 millions users. UML is therefore a standard based on a model from which you get views.
IN UML 2 the class diagram is fantastic if used with Java because it seems to me that the new specification has exactly the same structure as a java project. It include a project name, with packages including classifiers (e.g. Class, interface, enum) which includes attributes, methodes which includes properties.
If you have to use just one diagram I would say to use Class diagram. It is easy to create because you don't need to know UML and can reverse engineer your project into a model a get class diagram views. My class diagram is Just magic:-)
类图表示类名,其属性和行为,而对象图表示类图的实例,对象图属于类图
Class diagram represent class name,its attributes and behaviours whereas object diagram represent instance of class diagram,object diagram comes under class diagram