Implementing Association, Aggregation, and Composition
This chapter will continue advancing our knowledge of object-oriented programming in C++. We will augment our understanding of object relationships by exploring the object-oriented concepts of association, aggregation, and composition. None of these OO concepts have direct language support in C++; we will instead learn multiple programming techniques to implement these ideas. We will also understand which implementation techniques are preferred for various concepts, as well as the advantages and pitfalls of various practices.
Association, aggregation, and composition occur copiously in OO designs. It is crucial to understand how to implement these important object relationships.
In this chapter, we will cover the following main topics:
- Understanding the OO concepts of aggregation and composition, and various implementations
- Understanding the OO concept of association and its implementation, including the importance...