February 2019
Beginner
504 pages
14h 34m
English
The power of object-oriented programming lies not only in inheritance, but also in its ability to treat a derived-class object like a base-class object. It is polymorphism and dynamic binding that support this mechanism.
Polymorphism means that different objects behave differently when they are given the same message. The call by member functions is the ‘message’ and different behaviors are due to different implementations, i.e., calling different functions. Polymorphism is quite often used in programming. The most common example is the math operator. We use the same plus sign “+” to implement adding operation between integers, floating numbers, and double precision floating numbers. The same message, ...