
17 Jul
2011
17 Jul
'11
6:14 a.m.
Patrick Browne :
For example, if the class Bird has a flying method can we represent Penguins as a sub-class of Bird without a flying method?
The silliest - from the pedagogical perspective - answer to any question, is "you don't need it". But ... in most cases you really don't need it... When instancing your Bird class you may "forget" to define the flying methods. Is this unsuitable for you? The compiler will yell, but this is harmless. Jerzy Karczmarczuk PS. Penguins DO fly. http://www.telegraph.co.uk/news/worldnews/1583517/Flying-penguins-found-by-B...