difference between overloading and overridding

Answer Posted / $rav$...

OVERLOADING:-Principle of overloading is achieved through
polymorphism .we can have any number of methods with the
same name but the difference in the signature(:parameters ).
OVERRIDING:-Principle of overriding is achieved through
inheritance.we can have any number of methods with same
name,parameters and signature but the rewriting of the code
of the super class method in the subclass is done and we
give the new functionality to that method of keeping its
signature as the same.
dynamic binding prevails in overriding.inheritance is
compulsory.
static binding prevails in overloading.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1640


What is the example of polymorphism?

773


write a C++ program for booking using constructor and destructor.

2295


Why we use classes in oop?

802


What is a class in oop?

790


Can we have inheritance without polymorphism?

819


What is abstraction in oop?

875


what is the drawback of classical methods in oops?

3143


What is the real time example of inheritance?

884


What does it mean when someone says I oop?

837


What is a class oop?

778


What is overloading in oop?

790


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

1905


What is protected in oop?

826


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1642