SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Prepared by : SELVIN JOSY BAI. S
It is the ability for a message or
  data to be processed in more
          than one form.

It is the property by which the
same message can be sent to
  objects of several different
             classes.
Polymorphism in C++ is achieved by

  Function Overloading


  Operator Overloading


  Dynamic Binding
Example

The message send by ringing the
bell in your school, is processed
in many forms by which we are
informed about
the beginning of the class,
end of the class,
beginning of an interval,
end of the day’s classes etc.
EARLY BINDING
It refers to the ability of the compiler
to relate or bind a function call with
the function definition during
compilation itself.
FUNCTION OVERLOADING and
OPERATOR OVERLOADING comes
under this category.
LATE BINDING

It refers to the binding of a
function call with the function
definition during runtime.
It uses the concept of POINTERS
and INHERITANCE.
POLYMORPHISM




       COMPILE TIME /               RUNTIME /
       STATIC / EARLY               DYNAMIC /
         BINDING                   LATE BINDING




 FUNCTION         OPERATOR           VIRTUAL
OVERLOADING      OVERLOADING        FUNCTION

Weitere ähnliche Inhalte

Was ist angesagt?

Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...cprogrammings
 
polymorphism and virtual function
polymorphism and virtual functionpolymorphism and virtual function
polymorphism and virtual functionBhanuprataparya
 
Dynamic Polymorphism in C++
Dynamic Polymorphism in C++Dynamic Polymorphism in C++
Dynamic Polymorphism in C++Dharmisha Sharma
 
Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Anil Bapat
 
2nd puc computer science chapter 8 function overloading
 2nd puc computer science chapter 8   function overloading 2nd puc computer science chapter 8   function overloading
2nd puc computer science chapter 8 function overloadingAahwini Esware gowda
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ programmatiur rahman
 
Function overloading and overriding
Function overloading and overridingFunction overloading and overriding
Function overloading and overridingRajab Ali
 
Virtual function
Virtual functionVirtual function
Virtual functionzindadili
 
JAVA Polymorphism
JAVA PolymorphismJAVA Polymorphism
JAVA PolymorphismMahi Mca
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented ProgrammingGamindu Udayanga
 
Operator Overloading and Scope of Variable
Operator Overloading and Scope of VariableOperator Overloading and Scope of Variable
Operator Overloading and Scope of VariableMOHIT DADU
 

Was ist angesagt? (20)

Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
Polymorphism in c++ ppt (Powerpoint) | Polymorphism in c++ with example ppt |...
 
polymorphism and virtual function
polymorphism and virtual functionpolymorphism and virtual function
polymorphism and virtual function
 
Dynamic Polymorphism in C++
Dynamic Polymorphism in C++Dynamic Polymorphism in C++
Dynamic Polymorphism in C++
 
polymorphism ppt
polymorphism pptpolymorphism ppt
polymorphism ppt
 
Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
2nd puc computer science chapter 8 function overloading
 2nd puc computer science chapter 8   function overloading 2nd puc computer science chapter 8   function overloading
2nd puc computer science chapter 8 function overloading
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
 
Function overloading and overriding
Function overloading and overridingFunction overloading and overriding
Function overloading and overriding
 
Virtual function
Virtual functionVirtual function
Virtual function
 
Oop l2
Oop l2Oop l2
Oop l2
 
Generics
GenericsGenerics
Generics
 
C by balaguruswami - e.balagurusamy
C   by balaguruswami - e.balagurusamyC   by balaguruswami - e.balagurusamy
C by balaguruswami - e.balagurusamy
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
C++ polymorphism
C++ polymorphismC++ polymorphism
C++ polymorphism
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
JAVA Polymorphism
JAVA PolymorphismJAVA Polymorphism
JAVA Polymorphism
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented Programming
 
Operator Overloading and Scope of Variable
Operator Overloading and Scope of VariableOperator Overloading and Scope of Variable
Operator Overloading and Scope of Variable
 

Andere mochten auch

Seminar on polymorphism
Seminar on polymorphismSeminar on polymorphism
Seminar on polymorphism023henil
 
Abstraction in java
Abstraction in javaAbstraction in java
Abstraction in javasawarkar17
 
Inheritance and Polymorphism Java
Inheritance and Polymorphism JavaInheritance and Polymorphism Java
Inheritance and Polymorphism JavaM. Raihan
 
Abstract class and Interface
Abstract class and InterfaceAbstract class and Interface
Abstract class and InterfaceHaris Bin Zahid
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces Tuan Ngo
 
Chapter 9 Abstract Class
Chapter 9 Abstract ClassChapter 9 Abstract Class
Chapter 9 Abstract ClassOUM SAOKOSAL
 
Polymorphism: opportunity or problem?
Polymorphism: opportunity or problem?Polymorphism: opportunity or problem?
Polymorphism: opportunity or problem?Covello Luca
 
Polymorphism and crystallisation : The mysterious phenomenon
Polymorphism and crystallisation : The mysterious phenomenonPolymorphism and crystallisation : The mysterious phenomenon
Polymorphism and crystallisation : The mysterious phenomenonMadhulika Harde
 
Solid state manipulation
Solid state manipulationSolid state manipulation
Solid state manipulationPrem Patil
 
Pattern of vitamin d receptor polymorphism
Pattern of vitamin d receptor polymorphism Pattern of vitamin d receptor polymorphism
Pattern of vitamin d receptor polymorphism Hesham Gaber
 
Polymorphism presentation in java
Polymorphism presentation in javaPolymorphism presentation in java
Polymorphism presentation in javaAhsan Raja
 

Andere mochten auch (20)

Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Seminar on polymorphism
Seminar on polymorphismSeminar on polymorphism
Seminar on polymorphism
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Abstraction in java
Abstraction in javaAbstraction in java
Abstraction in java
 
Inheritance and Polymorphism Java
Inheritance and Polymorphism JavaInheritance and Polymorphism Java
Inheritance and Polymorphism Java
 
Abstract class and Interface
Abstract class and InterfaceAbstract class and Interface
Abstract class and Interface
 
Genetic polymorphism
Genetic polymorphismGenetic polymorphism
Genetic polymorphism
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Method overloading and constructor overloading in java
Method overloading and constructor overloading in javaMethod overloading and constructor overloading in java
Method overloading and constructor overloading in java
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
 
Chapter 9 Abstract Class
Chapter 9 Abstract ClassChapter 9 Abstract Class
Chapter 9 Abstract Class
 
Lec 2 polymorphism
Lec 2 polymorphismLec 2 polymorphism
Lec 2 polymorphism
 
Dental pharmacy ~wali
Dental pharmacy ~waliDental pharmacy ~wali
Dental pharmacy ~wali
 
Polymorphism: opportunity or problem?
Polymorphism: opportunity or problem?Polymorphism: opportunity or problem?
Polymorphism: opportunity or problem?
 
Polymorphism and crystallisation : The mysterious phenomenon
Polymorphism and crystallisation : The mysterious phenomenonPolymorphism and crystallisation : The mysterious phenomenon
Polymorphism and crystallisation : The mysterious phenomenon
 
Solid state manipulation
Solid state manipulationSolid state manipulation
Solid state manipulation
 
Pattern of vitamin d receptor polymorphism
Pattern of vitamin d receptor polymorphism Pattern of vitamin d receptor polymorphism
Pattern of vitamin d receptor polymorphism
 
Polymorphism presentation in java
Polymorphism presentation in javaPolymorphism presentation in java
Polymorphism presentation in java
 

Ähnlich wie Polymorphism

Learn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator OverloadingLearn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator OverloadingEng Teong Cheah
 
Polymorphism
PolymorphismPolymorphism
Polymorphismzindadili
 
polymorphism.pdf
polymorphism.pdfpolymorphism.pdf
polymorphism.pdfriyawagh2
 
polymorphism-17013114666666666653806.pdf
polymorphism-17013114666666666653806.pdfpolymorphism-17013114666666666653806.pdf
polymorphism-17013114666666666653806.pdfkashafishfaq21
 
virtual function
virtual functionvirtual function
virtual functionVENNILAV6
 
C++ concept of Polymorphism
C++ concept of  PolymorphismC++ concept of  Polymorphism
C++ concept of Polymorphismkiran Patel
 
polymorphism OOP.pptx
polymorphism OOP.pptxpolymorphism OOP.pptx
polymorphism OOP.pptxAssadLeo1
 
Object Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World ScenarioObject Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World ScenarioDurgesh Singh
 
Polymorphism & Templates
Polymorphism & TemplatesPolymorphism & Templates
Polymorphism & TemplatesMeghaj Mallick
 
Basics of object oriented programming
Basics of object oriented programmingBasics of object oriented programming
Basics of object oriented programmingNitin Kumar Kashyap
 
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD?
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD? WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD?
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD? reactima
 
Why Functional Programming So Hard?
Why Functional Programming So Hard?Why Functional Programming So Hard?
Why Functional Programming So Hard?Ilya Sidorov
 
Comparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphismComparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphismCHAITALIUKE1
 

Ähnlich wie Polymorphism (20)

Learn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator OverloadingLearn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator Overloading
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
polymorphism.pdf
polymorphism.pdfpolymorphism.pdf
polymorphism.pdf
 
polymorphism-17013114666666666653806.pdf
polymorphism-17013114666666666653806.pdfpolymorphism-17013114666666666653806.pdf
polymorphism-17013114666666666653806.pdf
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
virtual function
virtual functionvirtual function
virtual function
 
Oop lecture 06
Oop lecture 06Oop lecture 06
Oop lecture 06
 
C++ concept of Polymorphism
C++ concept of  PolymorphismC++ concept of  Polymorphism
C++ concept of Polymorphism
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
C++ first s lide
C++ first s lideC++ first s lide
C++ first s lide
 
polymorphism OOP.pptx
polymorphism OOP.pptxpolymorphism OOP.pptx
polymorphism OOP.pptx
 
Object Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World ScenarioObject Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World Scenario
 
Polymorphism & Templates
Polymorphism & TemplatesPolymorphism & Templates
Polymorphism & Templates
 
07. Virtual Functions
07. Virtual Functions07. Virtual Functions
07. Virtual Functions
 
Basics of object oriented programming
Basics of object oriented programmingBasics of object oriented programming
Basics of object oriented programming
 
inline function
inline functioninline function
inline function
 
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD?
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD? WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD?
WHY JAVASCRIPT FUNCTIONAL PROGRAMMING IS SO HARD?
 
Why Functional Programming So Hard?
Why Functional Programming So Hard?Why Functional Programming So Hard?
Why Functional Programming So Hard?
 
OOPS & C++(UNIT 4)
OOPS & C++(UNIT 4)OOPS & C++(UNIT 4)
OOPS & C++(UNIT 4)
 
Comparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphismComparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphism
 

Mehr von Selvin Josy Bai Somu (8)

Client sidescripting javascript
Client sidescripting javascriptClient sidescripting javascript
Client sidescripting javascript
 
Web technology
Web technologyWeb technology
Web technology
 
Data structure stack&queue basics
Data structure stack&queue   basicsData structure stack&queue   basics
Data structure stack&queue basics
 
Files in c++
Files in c++Files in c++
Files in c++
 
Constructor and destructor
Constructor and destructorConstructor and destructor
Constructor and destructor
 
Inheritance
InheritanceInheritance
Inheritance
 
Function overloading
Function overloadingFunction overloading
Function overloading
 
Basics of c++
Basics of c++Basics of c++
Basics of c++
 

Polymorphism

  • 1. Prepared by : SELVIN JOSY BAI. S
  • 2.
  • 3. It is the ability for a message or data to be processed in more than one form. It is the property by which the same message can be sent to objects of several different classes.
  • 4. Polymorphism in C++ is achieved by Function Overloading Operator Overloading Dynamic Binding
  • 5. Example The message send by ringing the bell in your school, is processed in many forms by which we are informed about the beginning of the class, end of the class, beginning of an interval, end of the day’s classes etc.
  • 6.
  • 7.
  • 8.
  • 9. EARLY BINDING It refers to the ability of the compiler to relate or bind a function call with the function definition during compilation itself. FUNCTION OVERLOADING and OPERATOR OVERLOADING comes under this category.
  • 10. LATE BINDING It refers to the binding of a function call with the function definition during runtime. It uses the concept of POINTERS and INHERITANCE.
  • 11. POLYMORPHISM COMPILE TIME / RUNTIME / STATIC / EARLY DYNAMIC / BINDING LATE BINDING FUNCTION OPERATOR VIRTUAL OVERLOADING OVERLOADING FUNCTION