WhiteArea.java
1    
2    /* 
3     * Compute The WhiteArea of Die 
4    */
5            package shapes;
6    
7    import java.util.Scanner;
8    
9    public class WhiteArea {
10       public static void main(String[] args) {
11           double edgeLength = 19.0;
12           double dotDiameter = (edgeLength/8);
13   
14           // Create a square
15           SSquare dieFace = new SSquare(edgeLength);
16           System.out.println("Area of Dieface " + 6 * dieFace.area()); // 6 faces to a die by itself
17   
18           // create circle to calc area of dots
19           SCircle dots = new SCircle(dotDiameter/2);
20           System.out.println("Area of dots " + 21 * dots.area()); // 21 dots on a die by itself
21   
22           // white area
23           double whiteArea = ( ( 6 * dieFace.area() ) - ( 21 * dots.area())); // dieface - dots = white area
24           System.out.println("whiteArea = " + whiteArea);
25   
26       }
27   }
28   
29