YellowSpace.java
1        /* 
2         * This program will explore the computational solution to the area of yellow space by means of the 
3        * construction and use of basic shapes 
4        */
5    
6                package shapes;
7    
8                public class YellowSpace {
9    
10                  public static void main(String[] args) {
11   
12                      int edgeLength = 400;
13                      int distance = 60;
14                      SSquare largeGreySquare = new SSquare(edgeLength);
15                      double lgsCircleRadius = ( largeGreySquare.inscribingCircle().radius() - distance );
16                      SCircle lgsCircle = new SCircle(lgsCircleRadius);
17   
18                      SSquare largeYellowDiamond = lgsCircle.inscribingSquare();
19                      double lysCircleRadius = ( largeYellowDiamond.inscribingCircle().radius() - ( distance / 2.0 ) );
20                      SCircle lysCircle = new SCircle(lysCircleRadius);
21   
22                      SSquare smallGreySquare = lysCircle.inscribingSquare();
23                      double sgsCircleRadius = ( smallGreySquare.inscribingCircle().radius() - ( distance / 4.0 ) );
24                      SCircle sgsCircle = new SCircle(sgsCircleRadius);
25   
26                      SSquare smallYellowDiamond = sgsCircle.inscribingSquare();
27   
28                      double YellowSpace = ( ( largeYellowDiamond.area() - smallGreySquare.area() ) + smallYellowDiamond.area() );
29                      System.out.println("Yellow Space = " + YellowSpace + " mm^2");
30                  }
31      }