Composition and Aggregation in C++
In Object-Oriented Programming (OOP), Composition and Aggregation describe relationships between classes, specifically how objects are associated with one another. Both are forms of the “has-a” relationship, but they differ in strength and dependency. So in this article we will see the concept of Composition and Aggregation in C++ and also check the difference between Composition and Aggregation. What is Composition? Composition represents a strong relationship between two classes. It is used when an object (child) is a part of another…