//********************************************
// ball.java Author: Jayson
//*******************************************
import java.util.Scanner;
import java.text.DecimalFormat;
public class ball
{
//---------------------------------------------
// input a radius of a ball, then calculate
// its surface are and volume
//--------------------------------------------
public static void main(String[] args)
{
double radius, s, v;
DecimalFormat fmt = new DecimalFormat("0.####");
Scanner scan = new Scanner(System.in);
System.out.println("Please input a radius of a ball");
radius = scan.nextDouble();
scan.close();
v = (double)4 / 3 * Math.PI * Math.pow(radius , 3);
s = 4 * Math.PI * Math.pow(radius , 2);
System.out.println("The ball's volume is: " + fmt.format(v));
System.out.println("The surface are of the ball is: " + fmt.format(s));
}
}
//********************************************// ball.java Author: Jayson//*******************************************import java.util.Scanner;import java.text.DecimalFormat;public class bal