Question: Write a class that has three overloaded static methods for calculating the areas of the following geometric shapes: Circles Rectangles Cylinders Here
Write a class that has three overloaded static methods for calculating the areas of the following geometric shapes:
• Circles
• Rectangles
• Cylinders
Here are the formulas for calculating the area of the shapes.

Because the three methods are to be overloaded, they should each have the same name, but different parameter lists. Demonstrate the class in a complete program.
Area of a circle: where Area of a rectangle: Area of a cylinder: where Area = = r is Math.PI and r is the circle's radius Area = Width x Length Area = nrb is Math.PI, r is the radius of the cylinder's base, and h is the cylinder's height
Step by Step Solution
3.54 Rating (182 Votes )
There are 3 Steps involved in it
The program is as follows i Create the class called Geom with the three static ... View full answer
Get step-by-step solutions from verified subject matter experts
