Explain Aggregation

Aggregation: It is a relationship in which an object has one or more other subordinate objects as portion of its state. The subordinate objects usually have no self-governing existence separate from their containing object. Whenever the containing object has no further helpful existence, neither do the subordinate objects. For example, a gas station object may contain some pump objects. Such pumps will only exist as long as the station does. The Aggregation is also termed to as ‘has-a relationship’, to differentiate it from ‘is-a relationship’, that refers to inheritance.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.