the movement behavior of the mammals - Bat and Whales, exhibits which of the following (inheritance or polymorphism)
This is a discussion on inheritance or polymorphism within the C++ Programming forums, part of the General Programming Boards category; the movement behavior of the mammals - Bat and Whales, exhibits which of the following (inheritance or polymorphism)...
the movement behavior of the mammals - Bat and Whales, exhibits which of the following (inheritance or polymorphism)
What do you think, and why? (Frankly, both can be correct depending on the situation, so the why determines if you have the right idea.)
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
i think poly coz the statement refer to the movement.....but most of my friends said inheritance..im very confuse this question is going to come out tomorrow on my exam paper... need ur help what do you think...?
Well, put it in another way: given this problem, would you create a hierarchy of mammals, or a hierarchy of movements? If it is the former, then you would answer polymorphism. If it is the latter, then you would answer inheritance.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
thanks a lot