/home/cdesrivi/NetBeansProjects/CS1/src/shapes/RedArea.java
 1 /*
 2  * To change this license header, choose License Headers in Project Properties.
 3  * To change this template file, choose Tools | Templates
 4  * and open the template in the editor.
 5  */
 6 package shapes;
 7 
 8 /**
 9  *
10  * @author cdesrivi
11  */
12 public class RedArea {
13 
14     /**
15      * @param args the command line arguments
16      */
17     public static void main(String[] args) {
18         double outertable = 40;
19         SSquare table = new SSquare(outertable);
20         double distance = 3;
21         double middistance = (outertable - (2*distance)/2);
22         SCircle radius1 = new SCircle(middistance);
23         SSquare blue = radius1.inscribingSquare();
24         SSquare MidSquare = new SSquare(middistance);
25         double innerdistance = (outertable - (2*(middistance))/2);
26         SCircle radius2 = new SCircle(innerdistance);
27         SSquare inred = radius2.inscribingSquare();
28         SSquare InSquare = new SSquare(innerdistance);
29         double RedArea = (table.area() + blue.area() - innerdistance);
30         double RedArea1 = RedArea - innerdistance;
31         System.out.println("Area of RedSquare" + RedArea1);
32         
33     }
34     
35 }
36