Sunday, 25 August 2013

What is Polymorphism in OOP

Polymorphism is the essential pillar of Object Oriented Programming ,it come to use after encapsulation and Inheritance.
Polymorphism is a Greek word that means "many-shaped" : One thing can perform different work of each same call. Polymorphism enables us to "programming in the general" rather than "program in specific.
Let consider that example that commonly use in programming tutorial for example a method/function calculate the area, if any one can want to calculate the area of triangle then it give the output ,if any person want to get the area of Parallelogram then it give the area of this similarly if any one want to get area of circle then it give result ....
Now as you seen in above example that same thing can perform many action



This Picture give the abstract idea of Polymorphism.
There are many other terminology  in Polymorphism but here I am not discuss because I would not want to confuse you , but when we will on practical programming we discuss and tell you clear way.
Now I Hope you enjoy the tutorial. Please leave comment if you any Question ... :)
  

No comments:

Post a Comment