What is method "Overloading" in object-oriented programming (OOP) ?

Method or function overloading allows a method with the same name to be declared more than once given that they have different input parameters.

For example, there is a method to calculate the area of shapes. There are different shapes such as circles and rectangles. In these two cases, if someone calls the function calculateArea, the result should be correct for the given shape, regardless of whether the shape is a circle or a rectangle. The declaration of this in a programming language in shown below:

Rectangle: calculateArea(double length, double width

Circle:  calculateArea(double radius)

A great advantage of method overloading is that it allows a programmer to use the function appropriately without having to know the inner-workings of that method. 

Argha S. GCSE Physics tutor, GCSE Maths tutor, GCSE Computing tutor, ...

1 year ago

Answered by Argha, an A Level Computing tutor with MyTutor

Still stuck? Get one-to-one help from a personally interviewed subject specialist


£20 /hr

Matthew M.

Degree: MSci Computer Science (Masters) - Lancaster University

Subjects offered:Computing, Maths+ 3 more

Business Studies
-Personal Statements-

“About Matt: I'm Matt and I am a computer science student at Lancaster University. I have often been described as being friendly and hardworking by my friends, family and work colleagues. Prior to University I worked in the industry as...”

£22 /hr

Jay L.

Degree: Computer Science (Masters) - Bristol University

Subjects offered:Computing, Maths+ 1 more


“About me: Hi, I’m Jay, a first year Computer Science student at the University of Bristol! I am here to help students prepare for their exams (GCSE, AS/A Level etc) in Maths and Computing. My teaching style can vary depending on how y...”

£20 /hr

Juris B.

Degree: Computer Science (Bachelors) - St. Andrews University

Subjects offered:Computing, Maths


“I am a Computer Science at the University of St. Andrews. Before that however, I was a pupil in a school in the North-East of Scotland. With the combined passion and availability of superb teachers - I was given an opportunity to exce...”

About the author

£20 /hr

Argha S.

Degree: Computer Systems (Bachelors) - Warwick University

Subjects offered:Computing, Physics+ 1 more


“Top tutor from the renowned Russell university group, ready to help you improve your grades.”

MyTutor guarantee

You may also like...

Other A Level Computing questions

When a stack is implemented using a 1-D array, adding a valid item can cause an execution error. Explain why an execution error can occur in this situation.

A computer stores floating point numbers of size 1 byte, with 3 bits for the mantissa and 5 bits for the exponent. State what the effects would be on the stored numbers if instead 5 bits were used for the mantissa and 3 bits were used for the exponent.

What is the difference between interpreted and intermediate code?

Some problems are intractable. What does it mean for a problem to be described as intractable?

View A Level Computing tutors

We use cookies to improve your site experience. By continuing to use this website, we'll assume that you're OK with this. Dismiss