Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Objective-C Homework
What is the difference between overloading and overriding in object-orientated systems?
Posted 22-Jul-10 0:13am
copelia358
Edited 22-Jul-10 0:23am
v3
Comments
Alison P at 22-Jul-10 5:25am
   
I have removed your email address and replaced it with a proper title. The title is there so that people know whether they want to read your question so it is best to make it descriptive and if you put your email address on public forums it only encourages spam. :)
Sandeep Mewara at 22-Jul-10 5:57am
   
Any beginner book would had told you that. Hope you have just not jumped to programming without reading one!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Overloading is when you define two methods with the same name in the same class but with different signatures.
 
Overriding is when you redefine a method that has already been defined in a parent class with ther same signature.
 
Overloading is resolved at compiletime. Overriding is mostly resolved at runtime, depending on language and situation. C++ and C# for example, are tricky in this respect, as methods are by default not overridable at runtime, but compile time (the virtual keyword controls this behaviour). The C# compiler will however issue warnings when it suspects you have got it wrong.
 
Hope that helps.
  Permalink  
v2
Comments
E.F. Nijboer at 22-Jul-10 5:31am
   
Although the question is ridiculous, your answer is completely correct :)
E.F. Nijboer at 22-Jul-10 5:32am
   
Reason for my vote of 5
Good answer
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Come on, are you serious? Just use google or look on the wiki page for oop.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

1)In overloading,function name must be the same but with different signatures,In overloading,function name must be the same but with same signatures
2)In overloading,methods got different functionalities but in overriding we have to redefine the defination of the base class's method using override keyword
3)Overloading is know as early binding,Overriding is know as late binding
4)Overloading can be performed without inheritence but overriding can't
 
regards
Sajid Ahmed Shahsroha
  Permalink  
v2
Comments
Sajid Ahmed Shahsroha at 19-Mar-11 7:57am
   
whoever downvoted me plz could you tell me why ?? so that i can improve myself
Member 10144694 at 18-Oct-13 5:57am
   
you have to replace the word overloading with overriding in first line.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 14 Mar 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100