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