SDE-II at Flipkart (company) (2019–present) · 8y ·
This is Inheritance (IS-A) vs. Composition (HAS-A) Relationship.
There are three classes Vehicle, Car and Engine and we just want to define relation of classes in language so we can say
Car is a Vehicle.
and
Car has a Engine.
1.3K views ·
View upvotes
· 1 of 8 answers
Something went wrong. Wait a moment and try again.