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

Class relationships

Object intercommunication is at the heart of object-oriented systems. The relationship is the logical link between objects. The way we can distinguish or set up a proper relationship between classes of objects defines both the performance and quality of the system design overall. Consider the Product and Warehouse classes; they are in a relationship called aggregation because the Warehouse contains Products, that is, the Warehouse aggregates Products:

There are several kinds of relationships in terms of pure OOP, such as association, aggregation, composition, instantiation, generalization, and others. 

主站蜘蛛池模板: 兴海县| 银川市| 滦南县| 阳曲县| 清徐县| 马尔康县| 磴口县| 马公市| 石渠县| 台安县| 韶山市| 大港区| 凉城县| 海伦市| 龙门县| 西城区| 通榆县| 涿州市| 磴口县| 迁西县| 大田县| 岱山县| 桐乡市| 大城县| 宜昌市| 象山县| 阳城县| 邢台县| 扬州市| 蕲春县| 元氏县| 江孜县| 兴隆县| 嘉鱼县| 凌云县| 罗城| 涿州市| 鸡西市| 尼勒克县| 鄯善县| 根河市|