Return
to chapter 8
Function Overloading:
-
Create more than one function with the same name.
-
The area of square depends on the length of one side.
-
The area of retangular depends on width and length.
-
The area of circle depends on radius.
-
We can have the following three functions in the same function
name.
-
int Area(int side)
-
int Area(int width, int length)
-
float Area(float radius)