/home/mbilodea/NetBeansProjects/CS1/src/shapes/RedArea.java
 1 /*
 2  * Program to determine the red area of a square with blue cuts.
 3  */
 4 package shapes;
 5 
 6 /**
 7  *
 8  * @author mbilodea
 9  */
10 public class RedArea {
11 
12     /**
13      * @param args the command line arguments
14      */
15     public static void main(String[] args) {
16         int EdgeLength = 40;
17         int distance = 3;
18         SSquare Table = new SSquare(EdgeLength);
19         SCircle LargeCircle = new SCircle((EdgeLength - (distance * 2)) / 2);
20         SSquare BlueSquare = LargeCircle.inscribingSquare();
21         SCircle SmallCircle = new SCircle(((BlueSquare.side() - (distance * 2))) / 2 );
22         SSquare InteriorSquare = SmallCircle.inscribingSquare();
23         double RedArea = ( ( Table.area() - BlueSquare.area()) + InteriorSquare.area());
24         System.out.println("Red area = " + RedArea + " inches squared");
25     }
26     
27 }
28