1 package shapes; 2 3 import shapes.SCircle; 4 import shapes.SRectangle; 5 import shapes.SSquare; 6 7 import javax.swing.SwingUtilities; 8 9 public class WhiteSpace { 10 11 public static void main(String[] args) { 12 13 double edgeLength = 16.0; 14 double dotsDiameter = edgeLength / 6; 15 double dotRadius = dotsDiameter / 2; 16 17 SSquare diceFace = new SSquare(edgeLength); 18 SCircle diceDot = new SCircle(dotRadius); 19 20 double AllDots = 21; 21 double areaofDots = (diceDot.area() * AllDots); 22 System.out.println("All Dots: " + AllDots); 23 System.out.println("Area of Dots: " + areaofDots); 24 25 double AllFaces = 6; 26 double areaofFaces = diceFace.area() * AllFaces; 27 System.out.println("All Faces: " + AllFaces); 28 System.out.println("Area six Faces: " + areaofFaces); 29 30 double areaofWhiteSpace = areaofFaces - areaofDots; 31 System.out.println("White Area: " + areaofWhiteSpace); 32 System.out.println("Total: " + areaofFaces + " - " + areaofDots + " = " + areaofWhiteSpace); 33 34 } 35 36 }