What is aggregation in OOP C++?

In C++, Aggregation is used to represent the ‘HAS-A’ relationship between two objects . It is a type of association. If in a process, one class defines another class as any entity reference then it is known as Aggregation. With the help of aggregation, you can also reuse the class.

Read more

Has a relation example in Java?

In Java, a Has-A relationship essentially implies that an example of one class has a reference to an occasion of another class or another occurrence of a similar class . For instance, a vehicle has a motor, a canine has a tail, etc. In Java, there is no such watchword that executes a Has-A relationship.19 Oca 2021

Read more