/home/jfernan6/NetBeansProjects/CSX/src/shapes/WhiteArea.java
 1 /*
 2  * To change this license header, choose License Headers in Project Properties.
 3  * To change this template file, choose Tools | Templates
 4  * and open the template in the editor.
 5  */
 6 package shapes;
 7 
 8 /**
 9  *
10  * @author jfernan6
11  */
12 public class WhiteArea {
13 
14     /**
15      * @param args the command line arguments
16      */
17     public static void main(String[] args) {
18         double edgelength = 1.25;
19         double dotdiameter = 1.25/7;
20         double dotradius = dotdiameter/2;       
21         SSquare dieface = new SSquare(edgelength);
22         SCircle diedot = new SCircle(dotradius);
23         int x = 1 ; 
24         double n1 = 0;
25         // LOOP THAT WILL FIND FOR WHITE AREA FOR EACH SIDE OF THE DIE 
26         //AND ADD THEM UP
27         while(x <= 6){
28         double areaofside = dieface.area() - diedot.area()*x;
29         double sumofallwhiteareas = n1 + areaofside;
30         n1 = sumofallwhiteareas ;
31         x = x+1;
32         if( x == 7) {
33         System.out.println("total white area of a standard die = " + sumofallwhiteareas);
34         }   
35      }
36    }
37  }