2011-09-30 43 views

回答

1

见本教程 http://www.cs.toronto.edu/~jm/340S/Slides6/ClassD.pdf

对象图包含一个实例的值类的看到example View其在一个特定时间点的对象系统的视图

类图as wiki

The class diagram is the main building block of object oriented modelling. It is used both for general conceptual modelling of the systematics of the application, and for detailed modelling translating the models into programming code. Class diagrams can also be used for data modeling.[1] The classes in a class diagram represent both the main objects and or interactions in the application and the objects to be programmed. In the class diagram these classes are represented with boxes which contain three parts: [2] 


A class with three sections. 
The upper part holds the name of the class 
The middle part contains the attributes of the class 
The bottom part gives the methods or operations the class can take or undertake 

请参阅further

+0

我还不清楚:( – pencilCake

1

我同意上一篇文章,但希望补充一下,类图基于UML,它是由OMG赞助并由超过5百万用户所知的认可语言。因此,UML是基于您从中获得观点的模型的标准。

在UML 2中,如果与Java一起使用,则该类图很棒,因为在我看来,新规范与java项目具有完全相同的结构。它包含一个项目名称,包含包括分类器(例如Class,interface,enum)的包含属性的methode,包含属性的methode。

如果你不得不使用一个图,我会说使用类图。创建起来很容易,因为您不需要知道UML,并且可以将您的项目逆向工程化为模型并获得类图视图。我的类图就是魔术:-)

0

类图表示类的名称,它的属性和而对象图代表了类图的实例行为,对象图涉及的类图下

相关问题