官术网_书友最值得收藏!

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:

主站蜘蛛池模板: 普洱| 原平市| 廊坊市| 库尔勒市| 金乡县| 大宁县| 襄垣县| 安顺市| 佛教| 法库县| 文水县| 荥阳市| 象州县| 文山县| 新营市| 益阳市| 温州市| 疏勒县| 唐河县| 敦煌市| 桦南县| 郯城县| 綦江县| 谢通门县| 保定市| 定陶县| 抚远县| 寻乌县| 富源县| 博乐市| 武功县| 泾阳县| 南华县| 新绛县| 闸北区| 上犹县| 高阳县| 奉贤区| 阿鲁科尔沁旗| 封丘县| 马山县|