Sunday, 9 October 2016

df vvvjk krrvrv fergerg rgv vvkv v



Polymorphism is the ability for class to provide different implimentations of methods that are called by the same name . Polymorphism allows a method of a class to be called in many formats means  One function behaves in different forms.In other words, "Many forms of a single object is called Polymorphism."

Real-world Example of Polymorphism
Example 1:
A teacher behaves students.

A teacher behaves his/her seniors.
Here teacher is an object but the attitude is different in different situations.
Example 2
A person behaves the son in a house at the same time that the person behaves an employee in an office.
Example 3
Your mobile phone, one name but many forms:
  • As phone
  • As camera
  • As mp3 player
  • As radio

Polymorphism Implementation:
Let’s understand some basic. If  a class A inherited by a class B

class A
{
          public void MethodA()
          {
           
           ……………..

            }
        

}

Share this

Author

0 Comment to "df vvvjk krrvrv fergerg rgv vvkv v"

Post a Comment