1 package shapes; 2 3 import shapes.SSquare; 4 import shapes.SCircle; 5 import shapes.WhiteSpace; 6 7 8 public class WhiteSpace { 9 public static void main(String[] args) { 10 double cubeLength= 0.63; 11 double dotDiameter=(cubeLength * (1.0/6.0)); 12 13 SSquare dieFace= new SSquare(cubeLength); 14 SCircle dieDot= new SCircle(dotDiameter/2); 15 16 int numFace=0; 17 int totalDots=0; 18 while (numFace<6){ 19 numFace= numFace+1; 20 totalDots= totalDots + numFace; 21 } 22 double cubeArea= dieFace.area() * numFace; 23 double whiteSpace= cubeArea - (dieDot.area()* totalDots); 24 System.out.println("the total white space on the entire die " + whiteSpace); 25 } 26 27 28 29 30 } 31