January 2014
Intermediate to advanced
352 pages
8h 21m
English
We have already introduced ourselves with ‘polymorphism’ in Section 5.1 wherein it was defined as an entity or object having two or more forms. In object-oriented programming (OOP), functions and operators can be overloaded to achieve polymorphic behaviour.
Polymorphic functions have one name with different implementations. If the functions belong to different classes then a message (say ‘close’) can be interpreted differently by different objects resulting in different responses as shown in Fig. 13.1.
Figure 13.1 Polymorphic behaviour of objects
Cardelli and Wegner gave ...
Read now
Unlock full access