20 Oct 2017

Polymorphism - OOPS Programming

Polymorphism: 

Polymorphism means one name many forms. One function behaves different forms. In other words, "Many forms of a single object is called Polymorphism."

Real World Example of Polymorphism:
Example-1: 

A Teacher behaves to student.
A Teacher behaves to his/her seniors.
Here teacher is an object but attitude is different in different situation.

Example-2: 

Person behaves SON in house at the same time that person behaves EMPLOYEE in office.

Example-3: 

Your mobile phone, one name but many forms
As phone
As camera
As mp3 player
As radio

1 comment: