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

What is the advantage of oop over procedural language?

622


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

1650


How do you use inheritance in unity?

585


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2157


When not to use object oriented programming?

565






2. Give the different notations for the class.\

1584


Why do we need oop?

657


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1636


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1140


How do you define social class?

594


Why is object oriented programming so hard?

610


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1938


Plese get me a perfect C++ program for railway/airway reservation with all details.

3424


What is polymorphism in oops with example?

525


Which method cannot be overridden?

574