1 package shapes; 2 3 4 public class GreySpace { 5 public static void main (String[] args) { 6 //name variables 7 double Ledge = 750; 8 double ycornd = 60; 9 double gcornd = 45; 10 //make big gray square 11 SSquare bigGray = new SSquare(Ledge); 12 //inscribe with a circle 13 SCircle y1 = bigGray.inscribingCircle(); 14 //getting the radius of y1 15 double y1r = y1.radius(); 16 //shortening by the distance needed 17 double y2r = (y1r-ycornd); 18 //creating new circle 19 SCircle y2 = new SCircle(y2r); 20 //inscribing a square, this is the yellow square 21 SSquare y = y2.inscribingSquare(); 22 //inscribing the new square with another circle 23 SCircle g1 = y.inscribingCircle(); 24 //getting radius of g1 and shortening by proper distance 25 double g1r = g1.radius(); 26 double g2r = (g1r-gcornd); 27 //creating new circle and inscribing it with a square, this new square is the small gray square 28 SCircle g2 = new SCircle(g2r); 29 SSquare lilgray = g2.inscribingSquare(); 30 //establishing variables for all of the areas 31 double bigGrayA = bigGray.area(); 32 double yellowA = y.area(); 33 double lilGrayA = lilgray.area(); 34 //calculating the gray area 35 double grayArea = (bigGrayA+(lilGrayA-(yellowA))); 36 //output 37 System.out.println("The area of the gray space is "+ grayArea + " mm^2"); 38 39 40 41 42 } 43 } 44