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.