package shapes; public class YellowSpace { public static void main(String[] args){ double edgeLength = 400; //in mm, of bigger gray square double distance1 = 60; // in mm, to midpoint of big gray square side from yellow corner double distance2 = 30; //corner of inner diamond to outer grey square double distance3 = 15; // in mm of midpoint of side to smaller grey square SSquare bigGraySquare = new SSquare(edgeLength); //establish outer square //using circles to imagine problem... if edge length is 400, radius would be 200, so circle would have that radius, subtracted by distance double bigCircleDiamondRadius = (edgeLength / 2) - distance1; SCircle imaginativeCircle = new SCircle(bigCircleDiamondRadius); SSquare largeYellowDiamond = imaginativeCircle.inscribingSquare(); double smallCircleDiamondRadius = largeYellowDiamond.side() - distance2 ; SCircle smallImaginativeCircle = new SCircle(smallCircleDiamondRadius); SSquare smallGreySquare = smallImaginativeCircle.inscribingSquare(); double smallestCircleRadius = smallGreySquare.side() - distance3; SCircle smallestCircle = new SCircle(smallestCircleRadius); SSquare smallYellowDiamond = smallestCircle.inscribingSquare(); double YelDiaArea = (largeYellowDiamond.area() - smallGreySquare.area()) + smallYellowDiamond.area(); // get the area of the entire diamond System.out.println("The area of the yellow portion is: " + YelDiaArea); } }