1 /* 2 /Program to compute the white area of a standard white die with black dots 3 */ 4 5 6 package shapes; 7 8 public class WhiteArea { 9 public static void main(String[] args) { 10 double edgeLength = 0.75; 11 double dotDiameter = edgeLength/8; 12 double dotRadius = dotDiameter/2; 13 SCircle dieDot = new SCircle(dotRadius); 14 SSquare dieFace = new SSquare(edgeLength); 15 double diceFaceArea = dieFace.area(); 16 double dotArea = (dieDot.area()*21); 17 double diceWhite = diceFaceArea - dotArea; 18 System.out.println("The white area of the white die with black dots is: " + diceWhite + "inches."); 19 20 21 22 23 } 24 } 25