Ques : Describe Advantages of Polymorphism

, , No Comments

 

  1. The biggest advantage of polymorphism is creation of reusable code by programmer's
    classes once written, tested and implemented can be easily reused without caring
    about what‟s written in the case.

2. Polymorphic variables help with memory use, in that a single variable can be used to
store multiple data types (integers, strings, etc.) rather than declaring a different
variable for each data format to be used.

3. Applications are Easily Extendable: Once an application is written using the concept
of polymorphism, it can easily be extended, providing new objects that conform to the
original interface. It is unnecessary to recompile original programs by adding new
types. Only re-linking is necessary to exhibit the new changes along with the old
application. This is the greatest achievement of C++ object-oriented programming. In
programming language, there has always been a need for adding and customizing. By
utilizing the concept of polymorphism, time and work effort is reduced in addition to
making future maintenance easier.

4. It provides easier maintenance of applications

5. It helps in achieving robustness in applications.

0 टिप्पणियाँ:

Post a Comment