package shapes; import javax.swing.SwingUtilities; import painter.SPainter; import java.awt.Color; import javax.swing.SwingUtilities; import shapes.SCircle; import shapes.SSquare; public class YellowSpace { public static void main(String[] args) { //constants double BigGrayE = 400; double FirstGap = 60; double SecondGap = 30; double ThirdGap = 15; SSquare BigGray = new SSquare(BigGrayE); SCircle BigYellowC = new SCircle(BigGrayE/2 - FirstGap); SSquare BigYellowS = BigYellowC.inscribingSquare(); System.out.println(BigYellowS.side()); double BigYellowE = BigYellowS.side(); SCircle LilGrayC = new SCircle(BigYellowE/2 - SecondGap); SSquare LilGrayS = LilGrayC.inscribingSquare(); System.out.println(LilGrayS.side()); double LilGrayE = LilGrayS.side(); SCircle LilYellowC = new SCircle(LilGrayE/2 - ThirdGap); SSquare LilYellowS = LilYellowC.inscribingSquare(); System.out.println(LilYellowS.side()); //areas double BigYellowArea = BigYellowS.area(); double LilGrayArea = LilGrayS.area(); double LilYellowArea = LilYellowS.area(); //Calc double TotalGray = ((BigYellowArea + LilYellowArea) - LilGrayArea); System.out.println("The Final Value of Yellow Area is:"); System.out.println("{ "+TotalGray+" }"); } }