1 package expressions; 2 3 import shapes.SCircle; 4 import shapes.SSquare; 5 6 public class WhiteArea { 7 public static void main(String[] args) { 8 // Values of the die below 9 double edgeLength = 19.0; 10 double dotRadius = ((edgeLength * (1.0/8.0))/2.0); 11 SCircle dot = new SCircle(dotRadius); 12 SSquare die = new SSquare(edgeLength); 13 double side1 = (die.area() -dot.area()); 14 double side2 = (die.area() - (dot.area() * 2)); 15 double side3 = (die.area() - (dot.area() * 3)); 16 double side4 = (die.area() - (dot.area() * 4)); 17 double side5 = (die.area() - (dot.area() * 5)); 18 double side6 = (die.area() - (dot.area() * 6)); 19 double totalWhiteArea = (side1 + side2 + side3 + side4 + side5 + side6); 20 System.out.println("Total white area of the die =" + totalWhiteArea); 21 22 } 23 } 24