WhiteArea.java
1    package shapes;
2    import java.util.Scanner;
3    public class WhiteArea {
4        public static void main(String[] args) {
5    
6            double sideWidth = .75;
7            double dotDiameter = (sideWidth / 8);
8            double dotRadius = (dotDiameter / 2);
9            double numberOfDots = 21;
10           double numberOfSides = 6;
11   
12           SSquare edge = new SSquare(sideWidth); //white side length
13           SCircle dot = new SCircle(dotRadius); //individual dot radius
14   
15           double whiteArea = (numberOfSides * edge.area()); //area of all white sides together
16           double dotArea = (dot.area() * numberOfDots); //total dot area
17           double total = (whiteArea - dotArea); //total area of white space on the die
18           System.out.println("The white area left over is " + total + " out of " + whiteArea);
19       }
20   }