Thank you, that works a treat :)
Type: Posts; User: Alex L
Thank you, that works a treat :)
Thank you for pointing that out. I didn't notice it. By changing part of the code to this:
private double volume() {
volume = 1.33333333 * Math.PI * Math.pow(radius(), 3);
return volume;
...
A question (not homework, a question from a book, don't worry) asks me to create a program to work out the volume and surface area of a sphere.
The surface area part works fine, it is the volume...