Home » Learn C++ » Polymorphism

Polymorphism

Polymorphism:

            Polymorphism is another most important feature of Object Oriented Programming. In polymorphism, the member functions with the same name are defined in each derived class and also in the base class. Polymorphism is used to keep the interface of base class to its derived classes.

 

            Poly means many and morphism means form. Polymorphism, therefore, is the ability for objects of different classes related by inheritance to response differently to the same function call. Polymorphism is achieved by means of virtual functions. It is rendered possible by the fact that one pointer to a base class object may also point to any abject of its derived class.

Other Topics

comment closed

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Copyright © 2010 Information Village. All rights reserved.