/home/evankemp/NetBeansProjects/CS1/src/shapes/BlackArea.java
 1 /*
 2  * Program to find the area of the table that is not obscured by objects.
 3  */
 4 package shapes;
 5 
 6 /**
 7  *
 8  * @author evankemp
 9  */
10 public class BlackArea {
11 
12     /**
13      * @param args the command line arguments
14      */
15     public static void main(String[] args) {
16         //INTRODUCING RELEVANT DATA
17         int tableSide = 39;
18         double deckLength = 3.5;
19         double deckWidth = 2.25;
20         double glassSide = 2.1;
21         
22         //CREATING THE OBJECTS
23         SSquare table = new SSquare(tableSide);
24         SRectangle deck = new SRectangle(deckLength,deckWidth);
25         SSquare glass = new SSquare(glassSide);
26         SCircle coaster = glass.circumscribingCircle();
27 
28         //COMPUTING THE WANTED AREA
29         double objectsArea = ((2*deck.area())+(4*coaster.area()));
30         double blackArea = (table.area()-objectsArea);
31         
32         //SOLUTION!
33         System.out.println("The area of the table that is not obscured is "
34                 + blackArea + " inches squared");
35                 
36     }
37     
38 }
39