YellowSpace.java
1    /*The side length of the big gray square is 400mm. The corners of the larger yellow diamond are exactly 60mm from the midpoints of the sides of the big gray square. 
2    The corners of the smaller gray square are exactly 30mm from the midpoints of the sides of the larger yellow diamond. 
3    The corners of the small yellow diamond are exactly 15mm from the midpoints of the sides of the smaller gray square. 
4     
5    In writing this program, you are required to proceed in a manner that is more or less consistent with the following guidelines: 
6    Name the values that serve to define the particular problem instance (edge length and distance from corner to midpoint in this case). 
7    Make use of the problem solving strategy of imaginative construction by mentally overlaying some number of circles on the image that can be exploited in the service of solving this problem. In fact, you should really draw them on the image of provided. 
8    Model objects that can be used to solve the problem in a fairly natural way – the large gray square, the large yellow diamond, the small gray square, and the small yellow diamond. In doing so, bring to bear computational manifestations of your imaginative constructions. 
9    Strive to present a simple expression of the solution which is grounded in the problem solving strategy of problem decomposition. 
10   Clearly, meaningfully, label the program output.*/
11           package shapes;
12   
13   public class YellowSpace {
14           public static void main(String[]args) {
15                   SSquare gSquare = new SSquare(400);
16                   double radius = ((gSquare.side() / 2) - 60);
17                   SCircle circle = new SCircle(radius);
18                   SSquare yDiamond = circle.inscribingSquare();
19                   double rad2 = ((yDiamond.side()/2)-30);
20                   SCircle circle2 = new SCircle(rad2);
21                   SSquare gSquareSmall = circle2.inscribingSquare();
22                   double rad3 = ((gSquareSmall.side() / 2) - 15);
23                   SCircle circle3 = new SCircle(rad3);
24                   SSquare yDiamondS = circle3.inscribingSquare();
25                   System.out.println("YelloW Area " + ((yDiamond.area()- gSquareSmall.area())+yDiamondS.area()));
26   
27   
28           }
29   }
30