I'm having to design a program in java to get the radius from the user than print back the diameter, circumference and area using that radius I'm not sure where I'm going wrong in this
import java.util.Scanner;
public class Circle
{
private static void circleInfo()
{
float radius;
public float getSolvedDiam()
{
return radius * 2;
}
public float getSolvedCircum()
{
return Math.PI * (radius * 2);
}
public float getSolvedArea()
{
return Math.PI * Math.pow(radius, 2);
}
}
Scanner inData = new Scanner(System.in);
System.out.println("Enter the radius");
float radius = inData.nextFloat();
}
public static void main(String[] args)
{
circleInfo();
System.out.println(circleInfo.getSolvedDiam());
System.out.println(circleInfo.getSolvedCircum());
System.out.println(circleInfo.getSlovedArea());
}
}
Thanks a lot
Dean