2011-09-30 39 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

類圖表示類的名稱,它的屬性和而對象圖代表了類圖的實例行爲,對象圖涉及的類圖下

相關問題