Question: Q1 Answer Q1(a)-Q1(b) using Java based on the formulas for calculating the volume of the shapes given in FIGURE Q1. Volume of a cylinder: Volume

 Q1 Answer Q1(a)-Q1(b) using Java based on the formulas for calculating

Q1 Answer Q1(a)-Q1(b) using Java based on the formulas for calculating the volume of the shapes given in FIGURE Q1. Volume of a cylinder: Volume = nr2h Volume of a cuboid: Volume = length x width x height where n is Math.PI, r is the radius, h is the height FIGURE Q1 (a) Write a class named volume that has two (2) overloaded static methods for calculating the volume of two (2) 3D shapes: cylinder, and cuboid. Implement the methods in a complete class. (9 marks)

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!