i have the SAME problem <<mod edit: as this >> and im habing a lot of trouble with area of circle and writing assigning it a radius value so that the output will only tell me its radius and area. i have this so far: package Project4;
public class Circle extends TwoDimensionalShape{
// declare instance variables
Circle (double diameter) {
this.diameter = diameter;
double radius = diameter / 2.0;
this.area = PI * radius * radius;
}
private static final double PI = Math.PI;
private double diameter;
private double area;
// area of circle
public double area () {
return area;
}
public static void main(String[] args)
{//declare local variables
Circle radius = new ;
}
}
help anyone?