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

  • Expert C++
  • Vardan Grigoryan Shunguang Wu
  • 90字
  • 2021-06-24 16:34:03

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. 

主站蜘蛛池模板: 砀山县| 武城县| 永胜县| 武汉市| 衡阳县| 阳新县| 卓资县| 嘉荫县| 称多县| 颍上县| 新河县| 六枝特区| 平乐县| 腾冲县| 平湖市| 阜新市| 望城县| 浮山县| 阳山县| 桐庐县| 定安县| 台中市| 安庆市| 贡嘎县| 陵川县| 仙游县| 岳普湖县| 惠东县| 木里| 庄浪县| 宝山区| 东山县| 荆门市| 武隆县| 台东市| 崇礼县| 来安县| 白山市| 桦南县| 广灵县| 巴马|