
394 Fundamentals of Computer Programming and IT
In Figure 15.9, polymorphism allows single object to invoke similar function from different classes. The
program action is different in all the classes. D
uring execution time, the code analogous to the object under
present reference will be executed.
15.10 MESSAGE PASSING
Object-oriented programming includes objects which communicate with each other. Programming with these
objects should be followed in steps shown below:
1. Declaring classes that define objects and their actions.
2. Declaring objects from classes.
3. Implementing relation between objects.
Data is transferred from one object ...