Write a program using a function called area() to compute the area of a : (i) circle(π* r2) where π = 3.14 (ii) square(side*side) (iii) rectangle ( length*breadth) By using function overloading
Answers
Answered by
0
Answer:
This program finds the area of square, rectangle and circle using method overloading. In this program we have three methods with same name area(), which means we are overloading area() method. By having three different implementation of area method, we are calculating the area of square, rectangle and circle.
Similar questions
English,
2 months ago
Math,
2 months ago
World Languages,
5 months ago
Hindi,
5 months ago
Environmental Sciences,
11 months ago
English,
11 months ago