Ritesh raushan wrote:what is the difference between Composition vs Inheritance....thanks
I suspect that this is the 1,000,001st time this question has been asked. I suggest you search for other threads or paste your subject title into Google and find an explanation that you understand.
Winston
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Inheritance is "IS-A" relationship like truck is a vehicle , while composition is "has-a" relationship like truck has a wheels. Inheritance means using the existing functionality while composition means you need to compose the functionality.
This article will give you the better understanding.
Ritesh raushan wrote:what is the difference between Composition vs Inheritance....thanks
I suspect that this is the 1,000,001st time this question has been asked. I suggest you search for other threads or paste your subject title into Google and find an explanation that you understand.
Inheritance is "IS-A" relationship like truck is a vehicle , while composition is "has-a" relationship like truck has a wheels. Inheritance means using the existing functionality while composition means you need to compose the functionality.
This article will give you the better understanding.