Alright I think I'm getting closer but now my program skips by my System.in feature so the radius is never enter and just runs to completion any help would be greatly appreciated
import java.util.Scanner;
public class Square
{
static class Circle
{
float radius;
public double CircleInfo()
{
Scanner in;
in = new Scanner(System.in);
System.out.println("Enter the radius");
radius = in.nextFloat;
}
public float radiusOut()
{
return radius;
}
public double diamOut()
{
return (radius * 2);
}
public double circumfOut()
{
return Math.PI * (radius * 2);
}
public double areaOut()
{
return Math.PI * Math.pow(radius, 2);
}
}
public static void main(String[] args)
{
Circle testCircle;
testCircle = new Circle();
System.out.println("The radius is " + testCircle.radiusOut());
System.out.println("The diameter is " + testCircle.diamOut());
System.out.println("The circumference is " + testCircle.circumfOut());
System.out.println("The area is " + testCircle.areaOut());
}
}
Thanks
Dean