Home | | Computer Science 11th std | C++ Polymorphism: Points to Remember

Chapter: 11th Computer Science : Chapter 15 : Polymorphism

C++ Polymorphism: Points to Remember

in C++, polymorphism is achieved through function overloading and operator overloading.

Points to Remember:

 

In C++, polymorphism is achieved through function overloading and operator overloading.

 

The term overloading means a name having two or more distinct meanings.

 

Overloaded function’ refers to a function having more than one distinct meaning.

 

Overloaded functions have same name but different signatures (Number of argument and type of argument)

 

A function’s argument list is known as a function signature

 

Two function cannot be overloaded when the only difference is that one takes a reference parameter and the other takes a normal, call-by-value parameter.

 

Ordinary functions as well member functions can be overloaded

 

A class can have overloaded constructorswhereasdestructor function cannot be overloaded.

 

The mechanism of giving special meaning to an operator is known as operator overloading.

 

Operator overloading provides new definitions for most of the C++ operators.

 

Even user defined types (objects) can be overloaded.

 

The definition of the overloaded operator is given using the keyword 'operator' followed by an operator symbol.

 

We can overload all the C++ operators except the following:

 

Class member access operator (., .*) ,Scope resolution operator (::), Size operator (sizeof) andConditional operator ( ?: )

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
11th Computer Science : Chapter 15 : Polymorphism : C++ Polymorphism: Points to Remember |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.