/home/kchan2/NetBeansProjects/CS1/src/shapes/WhiteArea.java
 1 /*
 2  * A program to calculate the white area on a die.
 3  */
 4 package shapes;
 5 
 6 /**
 7  *
 8  * @author kchan2
 9  */
10 public class WhiteArea {
11 
12     /**
13      * @param args the command line arguments
14      */
15     public static void main(String[] args) {
16        double edgeLength = 1.25;
17        double dotDiameter = 1.25/7;
18        SSquare dieFace = new SSquare(edgeLength);
19        SCircle dieDot = new SCircle(dotDiameter/2);
20        double areaOfAllDieFaces = dieFace.area() * 6;
21        double areaOfAllDieDots = dieDot.area() * 21;
22        double whiteArea = areaOfAllDieFaces - areaOfAllDieDots;
23        System.out.println("The white area of the die = " + whiteArea 
24                + " square inches");
25     }
26     
27 }
28