Presentation ON Polymorphism in C Powered by- jpwebdevelopers Polymorphism in C The word polymorphism means having many forms. Polymorphism is considered as one of the important features of Object Oriented Programming. In simple words,
"Presentation ON Polymorphism in C++ Powered by-" is the property of its rightful owner. Permission is granted to
download and print the materials on this website for personal, non-commercial use only, and to display it
on your personal computer provided you do not modify the materials and that you retain all copyright
notices contained in the materials. By downloading content from our website, you accept the terms of this
agreement.
Presentation Transcript
01
Presentation ONPolymorphism in C++ Powered by- jpwebdevelopers<br>
02
Polymorphism in C++ The word polymorphism means having many forms.
Polymorphism is considered as one of the important features of Object Oriented Programming.
In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. Powered by- jpwebdevelopers<br>
03
Example of Polymorphism A person at the same time can have different characteristics. Like a man at the same time is a father, a husband, an employee. So the same person posses different behavior in different situations. This is called polymorphism. Powered by- jpwebdevelopers<br>
04
Types of Polymorphism Powered by- jpwebdevelopers<br>
05
Compile time polymorphism This type of polymorphism is achieved by function overloading or operator overloading.
function overloading.
operator overloading. Powered by- jpwebdevelopers<br>
06
Function overloading Function Overloading is defined as the process of having two or more function with the same name, but different in parameters is known as function overloading in C++. Powered by- jpwebdevelopers<br>
07
Operator Overloading You can redefine or overload most of the built-in operators available in C++.
Overloaded operators are functions with special names: the keyword "operator" followed by the symbol for the operator being defined Powered by- jpwebdevelopers<br>
08
Run Time Polymorphism This type of polymorphism is achieved by Function Overriding.
Function Overriding :-
If derived class defines same function as defined in its base class, it is known as function overriding in C++ Powered by- jpwebdevelopers<br>
09
virtual function A virtual function is a member function which is declared within a base class and is re-defined(Overriden) by a derived class.
Functions are declared with a virtual keyword in base class.
The resolving of function call is done at Run-time. Powered by- jpwebdevelopers<br>
10
Powered by- jpwebdevelopers Thank
You
Download ppt’s and handwritten notes
JP Web devolpers
Follow on instagram:-@jpwebdevelopers<br>