Aggregation implies a relationship where the child can exist independently of the parent . For example, Bank and Employee, delete the Bank and the Employee still exist. whereas Composition implies a relationship where the child cannot exist independent of the parent.
Read moreWhy do we need composition in Java?
Benefits of using Composition: Composition allows us to reuse the code . In Java, we can use multiple Inheritance by using the composition concept. The Composition provides better test-ability of a class. Composition allows us to easily replace the composed class implementation with a better and improved version.
Read moreWhat is aggregation in Oops Mcq?
Explanation: Aggregation occurs when objects have their own life cycle and child object can associate with only one parent object .
Read moreWhat is aggregation in Oops Mcq?
Explanation: Aggregation occurs when objects have their own life cycle and child object can associate with only one parent object .
Read moreWhat do you mean by aggregation?
1 : a group, body, or mass composed of many distinct parts or individuals A galaxy is an aggregation of stars and gas. 2a : the collecting of units or parts into a mass or whole.
Read moreWhat is aggregation with example in DBMS?
In aggregation, relationship with its corresponding entities is aggregated into a higher level entity . For example: Center entity offers the Course entity act as a single entity in the relationship which is in a relationship with another entity visitor.
Read moreWhat is aggregation with example in DBMS?
In aggregation, relationship with its corresponding entities is aggregated into a higher level entity . For example: Center entity offers the Course entity act as a single entity in the relationship which is in a relationship with another entity visitor.
Read more