Question: 1. Area Class Write a class that has three overloaded static methods for calculating the areas of the following geometric shapes: - circles - rectangles

 1. Area Class Write a class that has three overloaded static

1. Area Class 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. Area of a circle: Area = n r2 where p is Math.PI and r is the circle's radius Area of a rectangle: Area = Width x Length Area of a cylinder: Area = n p2 h where p is Math.PI, r is the radius of the cylinder's base, and h is the cylinder's height 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. SAMPLE RUN #3: java Area Interactive Session . Hide Invisibles Highlight: None Show Highlighted Only === .Area. Calculator === Enter radius.to.calculate.circle.area:2.02 Enter.width to calculate rectangle area:3.5- Enter.length to calculate rectangle.area:4.0- Enter.base.radius. to calculate cylinder area: 8.0- Enter.height to calculate cylinder area:5.7 Results: The area of the circle is: 12.57 The area of the rectangle is:.14.00-- The area of the cylinder.is: 1146.052

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!