Aggregation in Java is a relationship between two classes that is best described as a “has-a” and “whole/part” relationship . It is a more specialized version of the association relationship. The aggregate class contains a reference to another class and is said to have ownership of that class.29 Oca 2019
Read moreWhat is an example of aggregation in Java?
Simple Example of Aggregation op=new Operation(); int rsquare=op. square(radius); //code reusability (i.e. delegates the method call).
Read moreWhat is aggregation and composition in Java?
Dependency: 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.14 Mar 2022
Read more