- Design Patterns and Best Practices in Java
- Kamalmeet Singh Adrian Ianculescu LUCIAN PAUL TORJE
- 316字
- 2021-06-25 20:52:28
An introduction to Unified Modeling Language
Unified Modeling Language (UML) is a modeling language that helps us to represent how the software is structured; how different modules, classes, and objects interact with each other, and what the relations between them are.
UML is frequently used in association with object-oriented design, but it has a much broader scope. However, that is beyond the scope of this book, so, in the next sections, we will highlight the UML features relevant to this book.
In UML, we can define the structure and behavior of a system, and we can visualize the model or parts of it through diagrams. There are two types of diagram:
- Structure diagrams are used to represent the structure of a system. There are many types of structure diagrams, but we are only interested in class diagrams. object, package, and component diagrams are similar to class diagrams.
- Behavior diagrams are used to describe the behavior of a system. Interaction diagrams are a subset of behavior diagrams and are used to describe the flow of control and data among different components of a system. Among the behavior diagrams, the sequence diagram is used extensively in object-oriented design.
Class diagrams are the type of diagrams used most in object-oriented design and development stages. They are a type of structure diagram, and are used to illustrate the structure of classes and the relations among them:

Class diagrams are useful for describing how the classes are structured in an application. Most of the time, just looking at the structure can be enough to be able to understand how the classes interact, but sometimes this is not enough. For those cases, we can use behavior and interaction diagrams, of which the sequence diagram is used to describe class and object interaction. Let's use a sequence diagram to show how the Car and Vehicle objects interact in the inheritance and polymorphism example:

- INSTANT Mock Testing with PowerMock
- Visual Basic .NET程序設計(第3版)
- Spring技術內幕:深入解析Spring架構與設計
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- Modern JavaScript Applications
- 零基礎學Python網絡爬蟲案例實戰全流程詳解(入門與提高篇)
- Mastering ArcGIS Enterprise Administration
- 網絡數據采集技術:Java網絡爬蟲實戰
- 邊玩邊學Scratch3.0少兒趣味編程
- HTML5移動前端開發基礎與實戰(微課版)
- H5+移動營銷設計寶典
- Android編程權威指南(第4版)
- Java自然語言處理(原書第2版)
- 美麗洞察力:從化妝品行業看顧客需求洞察
- Getting Started with the Lazarus IDE