dotnetspider.com Home page     All Communities

DotNetInterviewQuestions&Answers


What is Ploymorphism?



My Profile 
  • Sign In
  •  
  • Register

  • Links 
  • Message Center
  •  
  • File Manager
  •  
  • Members
  •  
  • Hall Of Fame
  •  
  • Site Configuration





  • What is Ploymorphism?


    Posted Date: 09 Aug 2010      Total Responses: 0

    Posted By: priyanarayan       Member Level: Gold     Points: 10


    Polymorphism is a more advanced OOP feature that allows using objects of different
    classes when you only know a common base class from which they both derive.
    Polymorphism permits using a base class reference to access objects of that class,
    or objects of derived classes. Using polymorphism, you can have, for example, a
    method that receives as parameter an object of type Car, and when calling that
    method you supply as parameter an object of type SuperCar. Because SuperCar
    is a specialized version of Car, all the public functionality of Car would also be
    supported by SuperCar, although the SuperCar implementations could differ
    from those of Car. This kind of flexibility gives much power to an experienced
    programmer who knows how to take advantage of it.There are different types of Polymorphism. They are
    1.Compile Time Polymorphism
    2.Run Time Polymorphism.




    Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Post Reply
    You must Sign In to post a response.
    Next : What is meant by Tight Coupling in Object Oriented Terminology?
    Previous : How to define Public Variables in javaScript?
    Return to Discussion Forum
    Post New Message
    Category:

    Related Messages