1. Write a method which returns the volume of a cube, given the length of one side. A sample call is: double vol = cubeVolume(1.2); 2. Write a method which returns the area of a circle, given its...


1. Write a method which returns the volume of a cube, given the length of one side. A sample call is:


double vol = cubeVolume(1.2);


2. Write a method which returns the area of a circle, given its radius as a parameter. A sample call is:


double a = areaCircle(1.25);


The area of a circle is given by the formula Math.PI * r * r. Though we could use a number such as 3.14, a more accurate value is provided by Math.PI.




May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here