Conceptual Difference between composition and inheritance? | Sololearn: Learn to code for FREE!

+1

Conceptual Difference between composition and inheritance?

3/23/2017 9:38:21 AM

laiba malick

1 Answer

New Answer

0

Inheritance establishes "IS A" relationship. Composition establishes "HAS A" relationship. Example-Car has an Engine and Car is a Automobile. Composition is easily achieved at runtime whereas inheritance provides its features at compile time.