Summary
In this chapter, the following topics have been discussed:
- The possible relationship types between classes and objects.
- The differences and similarities between a class, an object, an instance, and a reference.
- Composition, which entails that a contained object is totally dependent on its container object.
- Aggregation, in which the contained object can live freely without any dependency on its container object.
- The fact that aggregation can be temporary between objects, but it is defined permanently between their types (or classes).
In the next chapter, we continue to explore OOP, primarily addressing the two further pillars upon which it is based: inheritance and polymorphism.