Not fully understanding the difference of how we implement the composition and aggregation…
So is it correct, that when we are just using the method of other object in our class - as was done in topic with Aggregation - we are using the Has-A approach and there is no connection with life expectancy of the objects, but when we are creating a new objects of other class inside of out class - it is a Part-Of and there is a connection?
It that approach in thinking right?
Thanks!
Dmitry
Type your question above this line.
Course: https://www.educative.io/collection/10370001/6201068373409792
Lesson: https://www.educative.io/collection/page/10370001/6201068373409792/4660708266475520