Here is version of Cone
. Is anything wrong?
// file: Cone.java
//
public class Cone
{
private double radius; // radius of the base
private double height; // height of the cone
public Cone( double R, double H )
{
radius = R;
height = H;
}
public double volume()
{
return Math.PI*R*R*H/3.0;
}
}