Aggregation & Composition in OOPs

Aggregation and composition in real project define HAS-A relationship. Aggregation differs from ordinary composition in that it does not imply ownership.  In composition, when the owning object is destroyed, so are the contained objects.  In aggregation, this is not necessarily true.  For example, a university owns various departments (e.g., Physics, chemistry), and each department has a number of professors. Now due to some reasons, if the … Continue reading Aggregation & Composition in OOPs