so i made a circle class that sets the radius, and should output the radius, circumference and area however, if i input the radius, the radius, circumference, area wont output back, it just shows as 0.0 heres my Circle.java
public class Circle
{
private double radius;
private double PI = 3.14159;
public void setRadius(double rad)
{
radius = rad;
}
public double getRadius()
{
return radius;
}
public double getArea()
{
return PI * radius * radius;
}
public double getDiameter()
{
return 2 * radius;
}
public double getCircumference()
{
return 2 * PI * radius;
}
}
and heres circledemo.java http://pastie.org/466414 -formatting didnt come out well here
First I input the radius, but when i call getRadius, circumference, area, it just outputs 0.0