- #1
tmt1
- 234
- 0
For object oriented programming, why is is acceptable to have a
penguin be a subtype of bird even though a penguin has different
attributes than a bird(supposing we have a fly method) and yet it is
unacceptable for for Motorcycle to be a subtype of Car even though it
has the same behaviour (ie drive method)?
penguin be a subtype of bird even though a penguin has different
attributes than a bird(supposing we have a fly method) and yet it is
unacceptable for for Motorcycle to be a subtype of Car even though it
has the same behaviour (ie drive method)?