- Design Patterns and Best Practices in Java
- Kamalmeet Singh Adrian Ianculescu LUCIAN PAUL TORJE
- 107字
- 2021-06-25 20:52:29
Aggregation
An aggregation is a special type of association. If inheritance is considered to be the is-a relationship, aggregation can be considered to be the HAS-A relationship.
Aggregation is used to describe a relation between two or more classes, when one class contains the other from a logical point of view, but instances of the contained class can live independently of the first class, outside of its context, or can be shared among other classes. For example, a Department HAS-A Teacher; additionally, every Teacher must belong to Department, but if a Department ceases to exist, a Teacher can still be active as shown in the following diagram:

推薦閱讀
- LabVIEW2018中文版 虛擬儀器程序設計自學手冊
- Visual FoxPro程序設計教程
- PHP 從入門到項目實踐(超值版)
- JavaScript語言精髓與編程實踐(第3版)
- 深入淺出Prometheus:原理、應用、源碼與拓展詳解
- 深入淺出Android Jetpack
- 精通API架構:設計、運維與演進
- Java程序設計與實踐教程(第2版)
- RabbitMQ Essentials
- 51單片機C語言開發教程
- Learning Node.js for .NET Developers
- OpenCV with Python Blueprints
- JavaScript從入門到精通(視頻實戰版)
- Learning Jakarta Struts 1.2: a concise and practical tutorial
- Mastering SciPy