- 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.
- Spark快速大數據分析(第2版)
- 使用GitOps實現Kubernetes的持續部署:模式、流程及工具
- Neural Network Programming with TensorFlow
- 深入淺出MySQL:數據庫開發、優化與管理維護(第2版)
- 數據中心數字孿生應用實踐
- MATLAB Graphics and Data Visualization Cookbook
- 數據科學工程實踐:用戶行為分析與建模、A/B實驗、SQLFlow
- 數字IC設計入門(微課視頻版)
- SQL Server深入詳解
- MySQL數據庫技術與應用
- 大數據技術原理與應用:概念、存儲、處理、分析與應用
- Filecoin原理與實現
- 企業大數據處理:Spark、Druid、Flume與Kafka應用實踐
- 區塊鏈應用開發指南:業務場景剖析與實戰
- 領域驅動設計精粹