educative.io

It's wrong - When Car dies, so does tyre, engine and doors too

When Car dies, so does tyre, engine and doors too is wrong - the objects don’t die - this example is NOT for composition.

the objects must actually be created inside the constructor of the owner class

2 Likes