Sunday, 27 March 2016

Real Life Example of Polymorphism

Real Life Example of Polymorphism


Hello friends here we learn about Polimorphism in java and also Real Life example of Polymorphism.

Polymorphisms is nothing but ability to take more than one forms(One Interface,Multiple Methods or One Name,Many Forms).

polymorphism:
Poly = many
morphs = forms
existing in many forms.

It is achieved by OVERLOADING and OVERRIDING.

Real Life Example of Polymorphism

Ben (Ben Ten) can transform in different different Aliens, Here one person can transform in more than one form.

Real Life Example of Polymorphism

Another Real Life Example of Polymorphism is;

A software engineer can perform different task at different instance of time depending on the task assign to him
he can done coding , testing , analysis and designing depending on the task assign and the requirement

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


No comments:

Post a Comment