Sunteți pe pagina 1din 1

The dictionary definition for polymorphism is the condition of occurring in

several different forms. This transpires very similarly within Object Orientated
Programming, commonly polymorphism is conveyed as a single interface, which
has more than one function. There are two different forms of polymorphism with
object orientated programming, either static polymorphism or dynamic
polymorphism; there are distinct differences between the two. Static
polymorphisms reaction to any function is decided at the compile time, whereas
on the other hand dynamic polymorphism is instead settled at the run time.
Static polymorphism brings together a function with an object in the course of
the compile time, there are two methods to instrument static polymorphism,
either using function overloading which permits the use of numerous definitions
for the unchanged function name within the equivalent scope. The other method
is the use of operator overloading.
In contrast Dynamic polymorphism enables the user to construct abstract
classes. An abstract class has certain rules: It is not possible to produce an
instance of an abstract class, nor assert an abstract method externally to an
abstract class and finally unlike a standard class and abstract class cannot be
sealed. The abstract classes are responsible for administering partial class
implementation of a given interface. The implementation is only ever finished
when the resultant class inherits as a result of it.

S-ar putea să vă placă și