- Hands-On Design Patterns with Java
- Dr. Edward Lavieri
- 192字
- 2021-06-24 14:57:55
Class diagrams
The class diagram is the most commonly used UML diagram, as it provides a visual description of a system's objects. Consider that, in Java, everything is an object, so you can see the relevance and reason as to why this particular diagram is so widely used. Class diagrams do more than just display objects—they visually depict their construction and relationships with other classes.
As you can see here, the basic component of the class diagram is a rectangle, divided into three sections. Each overall rectangle represents a class, and the class name appears using a bold typeface in the top section. The middle section contains attributes that correlate to variable fields. The third section contains operation data which, in Java, means functions and methods:

A simple example of a class diagram for a Kennel is displayed in the following diagram. The class name is Kennel, and there are three attributes (animal, breed, and name) and two operations (intake and discharge):

We will further explore class diagrams using our Kennel class example later in this chapter.
- 大數(shù)據(jù)技術(shù)基礎(chǔ)
- Python數(shù)據(jù)分析與挖掘?qū)崙?zhàn)
- 數(shù)據(jù)庫原理及應(yīng)用教程(第4版)(微課版)
- 數(shù)據(jù)分析實戰(zhàn):基于EXCEL和SPSS系列工具的實踐
- 云計算環(huán)境下的信息資源集成與服務(wù)
- Creating Mobile Apps with Sencha Touch 2
- PySpark大數(shù)據(jù)分析與應(yīng)用
- Python金融數(shù)據(jù)分析(原書第2版)
- SQL優(yōu)化最佳實踐:構(gòu)建高效率Oracle數(shù)據(jù)庫的方法與技巧
- 高維數(shù)據(jù)分析預(yù)處理技術(shù)
- INSTANT Android Fragmentation Management How-to
- 區(qū)域云計算和大數(shù)據(jù)產(chǎn)業(yè)發(fā)展:浙江樣板
- 爬蟲實戰(zhàn):從數(shù)據(jù)到產(chǎn)品
- 菜鳥學(xué)SPSS數(shù)據(jù)分析
- 改變未來的九大算法