What is aggregation and how does it work give an example?

An aggregate object is one which contains other objects . For example, an Airplane class would contain Engine, Wing, Tail, Crew objects. Sometimes the class aggregation corresponds to physical containment in the model (like the airplane). But sometimes it is more abstract (e.g. Club and Members).

Sizin İçin Seçtik  What is a class in C++ Mcq?

Leave a Reply

Your email address will not be published. Required fields are marked *