SlideShare a Scribd company logo
1 of 13
Polymorphism
By Nochiketa
Topics:
 1. What is Polymorphism?
 2. What is Polymorphism in OOP?
 3. How Polymorphism can be achieved?
 4. Types of Polymorphism
 5. Function Overloading
 6. Function Overriding
 7. Early Binding
 8. Late Binding and Virtual function
 9. Pure Virtual Function
What is Polymorphism?
 The process of representing one form in multiple form in known as
polymorphism . Typically, polymorphism occurs when there is a
hierarchy of classes and they are related by inheritance.
 It means that a call to a member function will cause a different
function to be executed depending on the type of object that
invokes the function.
What is Polymorphism in OOP?
 After the inheritance it is another most important feature
of OOP.
 In polymorphism, the member functions with same name are
define in base class and also in each derived class.
 Polymorphism is used to keep the interface of base class to
its derived classes.
 Polymorphism can be achieved by mean of virtual functions.
 In polymorphism one pointer to a base class object may also
point any object of its derived class.
How Polymorphism can be achieved:
 Polymorphism can be achieved in Three ways:
1. Function Overloading
2. Function Overriding
3. Dynamic Binding.
Types of Polymorphism:
Fig: Types of polymorphism
Polymorphism
Static Polymorphism :
Compile time/
static/Early Binding
Dynamic Polymorphism:
Runtime/Dynamic/Late
Binding
Types of Polymorphism:
 Static Polymorphism: It takes place during Compile
time. Function Overloading, Operator Overloading
implements static polymorphism.
 Dynamic Polymorphism: It takes place during Run
time. The member function whice change Their
behavior during run time called Virtual Functions.
Function Overloading
 Here we have multiple definitions for the same function name in the same scope. The
definition of the function must differ from each other by the types and/or the number of
arguments in the argument list.
Function Overriding
 Overriding of functions happens when one class inherits another class. Here functions of both
class have the same name and there world be same parameter list and return type of the
functions should be same.
Early Binding
 Events occurring at compile time are known as early binding. In the process of early binding
all info which is required for a function call is known at compile time. Examples of early
binding: function calls, overloaded function calls, and overloaded operators.
Late Binding and Virtual Function:
 All the Code is understood at the Time of Execution This is called as Late Binding. As we
Know that Late Binding is Performed By using the virtual Functions. Virtual Means Function
must be Override. Virtual Function is a function in base class, which is overrided in the
derived class, and which tells the compiler to perform Late Binding on this function.
Pure Virtual Function
 The virtual function that is only declare But Not Define In The In The
Base Class.
 General Syntax:
 virtual function_name()=0;
 The class that contains the pure virtual function exists only to act as
base or parent classes.
Polymorphism

More Related Content

What's hot

Paca oops slid
Paca oops slidPaca oops slid
Paca oops slidpacatarpit
 
Javascript for Intermediates
Javascript for IntermediatesJavascript for Intermediates
Javascript for IntermediatesAnkit Agrawal
 
Inheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphismInheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphismJawad Khan
 
Polymorphism in C++
Polymorphism in C++Polymorphism in C++
Polymorphism in C++Rabin BK
 
Glusterfs session #12 locks xlator posixlk
Glusterfs session #12   locks xlator posixlkGlusterfs session #12   locks xlator posixlk
Glusterfs session #12 locks xlator posixlkPranith Karampuri
 
Glusterfs session #11 locks xlator entrylks
Glusterfs session #11   locks xlator entrylksGlusterfs session #11   locks xlator entrylks
Glusterfs session #11 locks xlator entrylksPranith Karampuri
 
JAVA Polymorphism
JAVA PolymorphismJAVA Polymorphism
JAVA PolymorphismMahi Mca
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with XtendSven Efftinge
 
pointers,virtual functions and polymorphism
pointers,virtual functions and polymorphismpointers,virtual functions and polymorphism
pointers,virtual functions and polymorphismrattaj
 
Static keyword u.s ass.(2)
Static keyword u.s ass.(2)Static keyword u.s ass.(2)
Static keyword u.s ass.(2)Syed Umair
 
Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...Philip Schwarz
 
Java Building Blocks
Java Building BlocksJava Building Blocks
Java Building BlocksCate Huston
 
Thinking Like a Programmer
Thinking Like a ProgrammerThinking Like a Programmer
Thinking Like a ProgrammerCate Huston
 
Mark Seemann smashing together two repos using monoidal mappend
Mark Seemann smashing together two repos using monoidal mappendMark Seemann smashing together two repos using monoidal mappend
Mark Seemann smashing together two repos using monoidal mappendPhilip Schwarz
 

What's hot (20)

Paca oops slid
Paca oops slidPaca oops slid
Paca oops slid
 
Javascript for Intermediates
Javascript for IntermediatesJavascript for Intermediates
Javascript for Intermediates
 
Kotlin
KotlinKotlin
Kotlin
 
Inheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphismInheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphism
 
Kotlin L → ∞
Kotlin L → ∞Kotlin L → ∞
Kotlin L → ∞
 
Polymorphism in C++
Polymorphism in C++Polymorphism in C++
Polymorphism in C++
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Glusterfs session #12 locks xlator posixlk
Glusterfs session #12   locks xlator posixlkGlusterfs session #12   locks xlator posixlk
Glusterfs session #12 locks xlator posixlk
 
Glusterfs session #11 locks xlator entrylks
Glusterfs session #11   locks xlator entrylksGlusterfs session #11   locks xlator entrylks
Glusterfs session #11 locks xlator entrylks
 
JAVA Polymorphism
JAVA PolymorphismJAVA Polymorphism
JAVA Polymorphism
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with Xtend
 
pointers,virtual functions and polymorphism
pointers,virtual functions and polymorphismpointers,virtual functions and polymorphism
pointers,virtual functions and polymorphism
 
Static keyword u.s ass.(2)
Static keyword u.s ass.(2)Static keyword u.s ass.(2)
Static keyword u.s ass.(2)
 
Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...
 
Java Building Blocks
Java Building BlocksJava Building Blocks
Java Building Blocks
 
Bt0074
Bt0074Bt0074
Bt0074
 
Thinking Like a Programmer
Thinking Like a ProgrammerThinking Like a Programmer
Thinking Like a Programmer
 
Intro to kotlin
Intro to kotlinIntro to kotlin
Intro to kotlin
 
Coding in kotlin
Coding in kotlinCoding in kotlin
Coding in kotlin
 
Mark Seemann smashing together two repos using monoidal mappend
Mark Seemann smashing together two repos using monoidal mappendMark Seemann smashing together two repos using monoidal mappend
Mark Seemann smashing together two repos using monoidal mappend
 

Viewers also liked

ERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOS
ERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOSERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOS
ERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOSMarta Pérez
 
Al raza mar. apr. 2016
Al raza mar. apr. 2016Al raza mar. apr. 2016
Al raza mar. apr. 2016sunninews92
 
Comparativa PS4 Vs PC
Comparativa PS4 Vs PCComparativa PS4 Vs PC
Comparativa PS4 Vs PCCarles roca
 
3Com BA19-0207D
3Com BA19-0207D3Com BA19-0207D
3Com BA19-0207Dsavomir
 
Apprenticeships: Now and Plans for the Future
Apprenticeships: Now and Plans for the FutureApprenticeships: Now and Plans for the Future
Apprenticeships: Now and Plans for the FutureThe Pathway Group
 
Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...
Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...
Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...IJERA Editor
 
Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...
Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...
Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...IJERA Editor
 
Tarea numero iii de tecnologia aplicada de la educacion
Tarea numero iii de tecnologia aplicada de la educacionTarea numero iii de tecnologia aplicada de la educacion
Tarea numero iii de tecnologia aplicada de la educacionmelina cruz
 
Castigadas por no lucir las piernas
Castigadas por no lucir las piernasCastigadas por no lucir las piernas
Castigadas por no lucir las piernaspujadesblog
 
Generacion net
Generacion netGeneracion net
Generacion netceciharo
 
Еженедельный геологический обзор № 4
Еженедельный геологический обзор № 4Еженедельный геологический обзор № 4
Еженедельный геологический обзор № 4geologykz
 
Pecha kucha DelftX experiences for eMOOCs 19FEB15
Pecha kucha DelftX experiences for eMOOCs 19FEB15Pecha kucha DelftX experiences for eMOOCs 19FEB15
Pecha kucha DelftX experiences for eMOOCs 19FEB15Janine Kiers
 
3Com 80-005687-02
3Com 80-005687-023Com 80-005687-02
3Com 80-005687-02savomir
 
Wikis aplicación didáctica
Wikis aplicación didácticaWikis aplicación didáctica
Wikis aplicación didácticaSapa330
 
Mis peliculas favoritas
Mis peliculas favoritasMis peliculas favoritas
Mis peliculas favoritasmessizakarias
 

Viewers also liked (20)

ERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOS
ERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOSERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOS
ERASMUS + IN DUBLIN PROJECT BASED LEARNING: METODOLOGÍA POR PROYECTOS
 
Al raza mar. apr. 2016
Al raza mar. apr. 2016Al raza mar. apr. 2016
Al raza mar. apr. 2016
 
Ramanujan
RamanujanRamanujan
Ramanujan
 
Comparativa PS4 Vs PC
Comparativa PS4 Vs PCComparativa PS4 Vs PC
Comparativa PS4 Vs PC
 
3Com BA19-0207D
3Com BA19-0207D3Com BA19-0207D
3Com BA19-0207D
 
Apprenticeships: Now and Plans for the Future
Apprenticeships: Now and Plans for the FutureApprenticeships: Now and Plans for the Future
Apprenticeships: Now and Plans for the Future
 
Disney
DisneyDisney
Disney
 
Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...
Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...
Dynamic Modulus Master Curve Construction Using Christensen-Anderson-Marastea...
 
Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...
Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...
Electro-Disinfection of Municipal Wastewater: Laboratory Scale Comparison bet...
 
Tarea numero iii de tecnologia aplicada de la educacion
Tarea numero iii de tecnologia aplicada de la educacionTarea numero iii de tecnologia aplicada de la educacion
Tarea numero iii de tecnologia aplicada de la educacion
 
Castigadas por no lucir las piernas
Castigadas por no lucir las piernasCastigadas por no lucir las piernas
Castigadas por no lucir las piernas
 
Philosophie
PhilosophiePhilosophie
Philosophie
 
Hebreos Católicos: CELAM - Documento Conclusivo Aparecida 2007
Hebreos Católicos: CELAM - Documento Conclusivo Aparecida 2007Hebreos Católicos: CELAM - Documento Conclusivo Aparecida 2007
Hebreos Católicos: CELAM - Documento Conclusivo Aparecida 2007
 
Generacion net
Generacion netGeneracion net
Generacion net
 
Еженедельный геологический обзор № 4
Еженедельный геологический обзор № 4Еженедельный геологический обзор № 4
Еженедельный геологический обзор № 4
 
CVitae1(11)
CVitae1(11)CVitae1(11)
CVitae1(11)
 
Pecha kucha DelftX experiences for eMOOCs 19FEB15
Pecha kucha DelftX experiences for eMOOCs 19FEB15Pecha kucha DelftX experiences for eMOOCs 19FEB15
Pecha kucha DelftX experiences for eMOOCs 19FEB15
 
3Com 80-005687-02
3Com 80-005687-023Com 80-005687-02
3Com 80-005687-02
 
Wikis aplicación didáctica
Wikis aplicación didácticaWikis aplicación didáctica
Wikis aplicación didáctica
 
Mis peliculas favoritas
Mis peliculas favoritasMis peliculas favoritas
Mis peliculas favoritas
 

Similar to Polymorphism

polymorphism OOP.pptx
polymorphism OOP.pptxpolymorphism OOP.pptx
polymorphism OOP.pptxAssadLeo1
 
polymorphism.pdf
polymorphism.pdfpolymorphism.pdf
polymorphism.pdfriyawagh2
 
full defination of final opp.pptx
full defination of final opp.pptxfull defination of final opp.pptx
full defination of final opp.pptxrayanbabur
 
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
 
What is java polymorphism and its types in java training?
What is  java polymorphism and its types in java training?What is  java polymorphism and its types in java training?
What is java polymorphism and its types in java training?kritikumar16
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingmustafa sarac
 
oopsinvb-191021101327.pdf
oopsinvb-191021101327.pdfoopsinvb-191021101327.pdf
oopsinvb-191021101327.pdfJP Chicano
 
1669617800196.pdf
1669617800196.pdf1669617800196.pdf
1669617800196.pdfvenud11
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course yoavrubin
 
Java Interview Questions For Freshers
Java Interview Questions For FreshersJava Interview Questions For Freshers
Java Interview Questions For Fresherszynofustechnology
 
C++ concept of Polymorphism
C++ concept of  PolymorphismC++ concept of  Polymorphism
C++ concept of Polymorphismkiran Patel
 

Similar to Polymorphism (20)

polymorphism OOP.pptx
polymorphism OOP.pptxpolymorphism OOP.pptx
polymorphism OOP.pptx
 
Oop lecture 06
Oop lecture 06Oop lecture 06
Oop lecture 06
 
polymorphism.pdf
polymorphism.pdfpolymorphism.pdf
polymorphism.pdf
 
polymorphism
polymorphism polymorphism
polymorphism
 
Java Basics
Java BasicsJava Basics
Java Basics
 
full defination of final opp.pptx
full defination of final opp.pptxfull defination of final opp.pptx
full defination of final opp.pptx
 
OOPS & C++(UNIT 4)
OOPS & C++(UNIT 4)OOPS & C++(UNIT 4)
OOPS & C++(UNIT 4)
 
Learn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator OverloadingLearn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator Overloading
 
What is java polymorphism and its types in java training?
What is  java polymorphism and its types in java training?What is  java polymorphism and its types in java training?
What is java polymorphism and its types in java training?
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Pocket java
Pocket javaPocket java
Pocket java
 
oopsinvb-191021101327.pdf
oopsinvb-191021101327.pdfoopsinvb-191021101327.pdf
oopsinvb-191021101327.pdf
 
Oops in vb
Oops in vbOops in vb
Oops in vb
 
1669617800196.pdf
1669617800196.pdf1669617800196.pdf
1669617800196.pdf
 
Intervies
InterviesIntervies
Intervies
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Java Interview Questions For Freshers
Java Interview Questions For FreshersJava Interview Questions For Freshers
Java Interview Questions For Freshers
 
C++ concept of Polymorphism
C++ concept of  PolymorphismC++ concept of  Polymorphism
C++ concept of Polymorphism
 
C++ first s lide
C++ first s lideC++ first s lide
C++ first s lide
 

Recently uploaded

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 

Recently uploaded (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 

Polymorphism

  • 2. Topics:  1. What is Polymorphism?  2. What is Polymorphism in OOP?  3. How Polymorphism can be achieved?  4. Types of Polymorphism  5. Function Overloading  6. Function Overriding  7. Early Binding  8. Late Binding and Virtual function  9. Pure Virtual Function
  • 3. What is Polymorphism?  The process of representing one form in multiple form in known as polymorphism . Typically, polymorphism occurs when there is a hierarchy of classes and they are related by inheritance.  It means that a call to a member function will cause a different function to be executed depending on the type of object that invokes the function.
  • 4. What is Polymorphism in OOP?  After the inheritance it is another most important feature of OOP.  In polymorphism, the member functions with same name are define in base class and also in each derived class.  Polymorphism is used to keep the interface of base class to its derived classes.  Polymorphism can be achieved by mean of virtual functions.  In polymorphism one pointer to a base class object may also point any object of its derived class.
  • 5. How Polymorphism can be achieved:  Polymorphism can be achieved in Three ways: 1. Function Overloading 2. Function Overriding 3. Dynamic Binding.
  • 6. Types of Polymorphism: Fig: Types of polymorphism Polymorphism Static Polymorphism : Compile time/ static/Early Binding Dynamic Polymorphism: Runtime/Dynamic/Late Binding
  • 7. Types of Polymorphism:  Static Polymorphism: It takes place during Compile time. Function Overloading, Operator Overloading implements static polymorphism.  Dynamic Polymorphism: It takes place during Run time. The member function whice change Their behavior during run time called Virtual Functions.
  • 8. Function Overloading  Here we have multiple definitions for the same function name in the same scope. The definition of the function must differ from each other by the types and/or the number of arguments in the argument list.
  • 9. Function Overriding  Overriding of functions happens when one class inherits another class. Here functions of both class have the same name and there world be same parameter list and return type of the functions should be same.
  • 10. Early Binding  Events occurring at compile time are known as early binding. In the process of early binding all info which is required for a function call is known at compile time. Examples of early binding: function calls, overloaded function calls, and overloaded operators.
  • 11. Late Binding and Virtual Function:  All the Code is understood at the Time of Execution This is called as Late Binding. As we Know that Late Binding is Performed By using the virtual Functions. Virtual Means Function must be Override. Virtual Function is a function in base class, which is overrided in the derived class, and which tells the compiler to perform Late Binding on this function.
  • 12. Pure Virtual Function  The virtual function that is only declare But Not Define In The In The Base Class.  General Syntax:  virtual function_name()=0;  The class that contains the pure virtual function exists only to act as base or parent classes.