1 package shapes; 2 3 public class YellowSpace { 4 public static void main(String[] args) { 5 SSquare largeGray = new SSquare(400); 6 double referenceForLYSide = ((largeGray.side() * .5) - 60); // Creating a box which will have the diagonal equal to the length of the large yellow diamond 7 SSquare largeYellowSideDiagonal = new SSquare(referenceForLYSide); 8 double largeYellowSide = largeYellowSideDiagonal.diagonal(); 9 SSquare largeYellow = new SSquare(largeYellowSide); 10 double referenceForSGSide = ((largeYellow.side() * .5) - 30); // Creating a diamond which will have the diagonal equal to the length of the small gray box 11 SSquare smallGraySideDiagonal = new SSquare(referenceForSGSide); 12 double smallGraySide = smallGraySideDiagonal.diagonal(); 13 SSquare smallGray = new SSquare(smallGraySide); 14 double referenceForSYSide = ((smallGray.side() * .5) - 15); // Creating a box which will have the diagonal equal to the length of the small yellow diamond 15 SSquare smallYellowSideDiagonal = new SSquare(referenceForSYSide); 16 double smallYellowSide = smallYellowSideDiagonal.diagonal(); 17 SSquare smallYellow = new SSquare(smallYellowSide); 18 System.out.println("Side of large gray square = " + largeGray.toString()); 19 System.out.println("Side of large yellow square = " + largeYellow.toString()); 20 System.out.println("Side of small gray square = " + smallGray.toString()); 21 System.out.println("Side of small yellow square = " + smallYellow.toString()); 22 System.out.println("Yellow area = " + (smallYellow.area() + (largeYellow.area() - smallGray.area()))); 23 } 24 }