Declare method sphereVolume to calculate and return the volume of the sphere. Use the following statement to

Question:

Declare method sphereVolume to calculate and return the volume of the sphere. Use the following statement to calculate the volume:

double volume = (4.0 / 3.0) * Math.PI * Math.pow(radius, 3)

Write a Java application that prompts the user for the double radius of a sphere, calls sphereVolume to calculate the volume and displays the result.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Early Objects

ISBN: 9780134743356

11th Edition

Authors: Paul Deitel, Harvey Deitel

Question Posted: