In aggregation, the class is made up of other existing classes that may exist independent of the child class. In composition, the child class depends on its parent for existence .
Read moreWhat is aggregation in OOP?
Aggregation in OOPS is defined as a relation that exists between two or more two objects which individually have their own individual life cycle along with the ownership . Aggregation in OOPS constitutes 2 words (aggregation and OOPS).
Read moreWhy do we use aggregation in Java?
Aggregation helps in reusing the code . Object B can have utility methods and which can be utilized by multiple objects. Whichever class has object B then it can utilize its methods.
Read moreWhy do we use aggregation in Java?
Aggregation helps in reusing the code . Object B can have utility methods and which can be utilized by multiple objects. Whichever class has object B then it can utilize its methods.
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 is aggregation and association in Java?
Association refers to “has a” relationship between two classes which use each other. Aggregation refers to “has a”+ relationship between two classes where one contains the collection of other class objects.
Read more