1 /* 2 * This program will explore the computational solution to the area of yellow space by means of the 3 * construction and use of basic shapes 4 */ 5 6 package shapes; 7 public class YellowSpace { 8 9 public static void main(String[] args) { 10 int edgeLength = 400; 11 int distance = 60; 12 SSquare largeGreySquare = new SSquare(edgeLength); 13 double lgsCircleRadius = ( largeGreySquare.inscribingCircle().radius() - distance ); 14 SCircle lgsCircle = new SCircle(lgsCircleRadius); 15 SSquare largeYellowDiamond = lgsCircle.inscribingSquare(); 16 double lysCircleRadius = ( largeYellowDiamond.inscribingCircle().radius() - ( distance / 2.0 ) ); 17 SCircle lysCircle = new SCircle(lysCircleRadius); 18 SSquare smallGreySquare = lysCircle.inscribingSquare(); 19 double sgsCircleRadius = ( smallGreySquare.inscribingCircle().radius() - ( distance / 4.0 ) ); 20 SCircle sgsCircle = new SCircle(sgsCircleRadius); 21 SSquare smallYellowDiamond = sgsCircle.inscribingSquare(); 22 double YellowSpace = ( ( largeYellowDiamond.area() - smallGreySquare.area() ) + smallYellowDiamond.area() ); 23 System.out.println("Yellow Space = " + YellowSpace + " mm^2"); 24 } 25 } 26