1 package Shapes; 2 3 import shapes.SCircle; 4 import shapes.SSquare; 5 6 public class YellowSpace { 7 public static void main(String[] args) { 8 double greySquareToYellowDiamond = 80; 9 double yellowDiamondToGraySquare = 40; 10 SSquare greySquare = new SSquare(800); 11 double outerRad = ((greySquare.side() / 2) - greySquareToYellowDiamond); 12 SCircle circle = new SCircle(outerRad); 13 SSquare yellowDiamond = circle.inscribingSquare(); 14 double yellowRadius = ((yellowDiamond.side() / 2) - yellowDiamondToGraySquare); 15 SCircle innerCircle = new SCircle(yellowRadius); 16 SSquare smallGrey = innerCircle.inscribingSquare(); 17 System.out.println("The area of the yellow space = " + (yellowDiamond.area() - smallGrey.area())); 18 } 19 } 20