educative.io

How association , aggregation and composition are parent child relationship?

Hi team Educative,
I was reading the the OOPs and got a line “This creates a parent-child relationship between two classes, with one class owning the object of another”. Can you please help me how Has-A relation is parent child ?

Hi @Lavakush_Mani_Tiwari ,
Can you please share the lesson link where you have read it?


https://www.educative.io/module/lesson/object-oriented-programming/g2r61P6J65r

“Aggregation follows the has-A model. This creates a parent-child relationship between two classes, with one class owning the object of another.”