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

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:

主站蜘蛛池模板: 云霄县| 大方县| 新邵县| 阆中市| 营口市| 城口县| 客服| 咸宁市| 雷波县| 搜索| 缙云县| 临夏县| 安图县| 惠东县| 天门市| 鄄城县| 郎溪县| 安阳县| 辽阳市| 土默特右旗| 达州市| 河北省| 嵊州市| 平谷区| 舒兰市| 舒兰市| 同仁县| 金沙县| 永修县| 卫辉市| 教育| 湄潭县| 桐乡市| 萨嘎县| 紫金县| 土默特右旗| 日喀则市| 白朗县| 富民县| 诸城市| 石楼县|