package shapes; import static java.lang.StrictMath.sqrt; public class YellowSpace { public static void main(String[] args) { double SideLengthBigGrey = 400; System.out.println("Side Length of The Big Grey Square = " + SideLengthBigGrey + " mm"); double BigGreyArea = SideLengthBigGrey * SideLengthBigGrey; System.out.println("Area of The Big Grey Square = " + BigGreyArea + " mm"); double DiameterBigYellow = 400 - (60 + 60); System.out.println("Diameter of The Big Yellow Diamond = " + DiameterBigYellow + " mm"); double BigYellowArea = (DiameterBigYellow * DiameterBigYellow) / 2; System.out.println("Area of The Big Yellow Diamond = " + BigYellowArea + " mm"); double SideLengthBigYellow = sqrt(BigYellowArea); System.out.println("Side Length of The Big Yellow Diamond = " + SideLengthBigYellow + " mm"); double DiameterLittleGrey = SideLengthBigYellow - (30 + 30); System.out.println("Diameter of The Little Grey Square = " + DiameterLittleGrey + " mm"); double LittleGreyArea = (DiameterLittleGrey * DiameterLittleGrey) / 2; System.out.println("Area of The Little Grey Square = " + LittleGreyArea + " mm"); double SideLengthLittleGrey = sqrt(LittleGreyArea); System.out.println("Side Length of The Little Grey Square = " + SideLengthLittleGrey + " mm"); double DiameterLittleYellow = SideLengthLittleGrey - (15 + 15); System.out.println("Diameter of The Little Yellow Diamond = " + DiameterLittleYellow + " mm"); double LittleYellowArea = (DiameterLittleYellow * DiameterLittleYellow) / 2; System.out.println("Area of The Big Yellow Diamond = " + LittleYellowArea + " mm"); double TotalYellowSpace = BigYellowArea - (LittleGreyArea - LittleYellowArea); System.out.println("Total Yellow Space = " + TotalYellowSpace + " mm"); } }