1 package shapes; 2 3 import shapes.SSquare; 4 5 public class GreySpace { 6 7 public static void main(String[] args) { 8 double edgelength = 800; 9 double yellowdistance = 60; 10 double smallGreydistance = 60; 11 12 SSquare tablecloth = new SSquare(edgelength); 13 System.out.println("Tablecloth = " + edgelength); 14 double tableclotharea = tablecloth.area(); 15 System.out.println("Area of Tablecloth = " + tablecloth.area()); 16 17 double yellowdiamonddiameter = (edgelength) - (yellowdistance * 2); 18 double yellowdiamondradius = (yellowdiamonddiameter / 2); 19 System.out.println("Diameter of Yellow Diamond = " + yellowdiamonddiameter); 20 System.out.println("Radius of Yellow Diamond = " + yellowdiamondradius); 21 22 SCircle yellowdiamondC = new SCircle(yellowdiamondradius); 23 SSquare yellowdiamond = yellowdiamondC.inscribingSquare(); 24 double yellowdiamondlength = yellowdiamond.side(); 25 System.out.println("Length of Yellow Diamond = " + yellowdiamondlength); 26 double yellowdiamondarea = yellowdiamond.area(); 27 System.out.println("Area of Yellow Diamond = " + yellowdiamondarea); 28 29 double smallGreydiameter = (yellowdiamondlength) - (smallGreydistance * 2); 30 double smallGreyradius = (smallGreydiameter / 2); 31 System.out.println("Diameter of Interior Yellow Square = " + smallGreydiameter); 32 System.out.println("Radius of Interior Yellow Square = " + smallGreyradius); 33 34 SCircle smallGreyC = new SCircle(smallGreyradius); 35 SSquare smallGrey = smallGreyC.inscribingSquare(); 36 double smallGreylength = smallGrey.side(); 37 System.out.println("Length of Interior Yellow Square = " + smallGreylength); 38 double smallGreyarea = smallGrey.area(); 39 System.out.println("Area of Interior Yellow Square = " + smallGreyarea); 40 41 double GreySpace = (tableclotharea - yellowdiamondarea + smallGreyarea); 42 System.out.println("Area of Grey Space = " + GreySpace); 43 44 } 45 } 46