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

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. 

主站蜘蛛池模板: 台安县| 岱山县| 沭阳县| 南陵县| 富蕴县| 榆社县| 乐陵市| 盈江县| 社会| 许昌县| 汝南县| 麻栗坡县| 吴旗县| 乡宁县| 黑河市| 贵溪市| 平阳县| 二连浩特市| 威信县| 青铜峡市| 疏附县| 中山市| 涟水县| 阿克| 客服| 洮南市| 楚雄市| 庆安县| 都匀市| 广丰县| 呼图壁县| 镇康县| 灌南县| 罗甸县| 灵丘县| 鹿邑县| 牙克石市| 西宁市| 凤庆县| 平潭县| 遵化市|