What is aggregation in OOP with 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).

Leave a Reply

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