Visit www.myprogramminglab.com to complete this Programming Challenge online and get instant feedback. Area Class Write a class that has three overloaded static methods for calculating the areas of...


Visit www.myprogramminglab.com to complete this Programming Challenge online and get instant feedback.


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 5 πr² where π is Math.PI and r is the circle’s radius


Area of a rectangle: Area 5 Width 3 Length


Area of a cylinder: Area 5 πr2h where π 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.

Nov 25, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here