326,045 views
12 votes
12 votes
Code for the below question

We have to calculate the area of a rectangle, a square and a circle. Create an
interface 'Shape' with three methods declarations namely 'RectangleArea' taking two
parameters, 'SquareArea' and 'CircleArea' taking one parameter each. The parameters
of 'RectangleArea' are its length and breadth, that of 'SquareArea' is its side and that of
'CircleArea' is its radius. Now create another class 'Area' containing all the three
methods 'RectangleArea', 'SquareArea' and 'CircleArea' for printing the area of
rectangle, square and circle respectively. Create an object of class 'Area' and call all the
three methods.​

User Rags
by
2.9k points

1 Answer

15 votes
15 votes

Explanation:

can I use python?

yes or no

User Unheilig
by
2.7k points