WhiteArea.java
1    /* 
2     *program to compute the white area of a standard white die with black dots 
3     */
4    
5    package shapes;
6    
7    public class WhiteArea {
8       public static void main (String[] args) {
9           double edgelengthofDie = (0.75);
10          System.out.println("Edge-Length of Die = " +edgelengthofDie);
11          SSquare DieFace = new SSquare(edgelengthofDie);
12          double DieFaceArea = (DieFace.area());
13          System.out.println("Area of Each Die Face = " + DieFaceArea);
14          double TotalAreaofDie = (6* DieFaceArea);
15          System.out.println("Total Area of Die = " +TotalAreaofDie);
16          SCircle dot = new SCircle((edgelengthofDie)/(8.0*2));
17          double DotArea = ( dot.area());
18          System.out.println("Area of Each Dot = " +DotArea);
19          double TotalAreaofDots = (21 * DotArea);
20          System.out.println("Total Area of All Die = " +TotalAreaofDots);
21          double WhiteArea = (TotalAreaofDie-TotalAreaofDots);
22          System.out.println("White Area = " +WhiteArea);
23      }
24   }
25