/home/mbilodea/NetBeansProjects/CS1/src/shapes/BlackArea.java
 1 /*
 2  * Program to find the obscured area of a table with objects upon it.
 3  */
 4 package shapes;
 5 
 6 /**
 7  *
 8  * @author mbilodea
 9  */
10 public class BlackArea {
11 
12     /**
13      * @param args the command line arguments
14      */
15     public static void main(String[] args) {
16         double tablelength = 39;
17         double glasslength = 2.1;
18         SSquare table = new SSquare(tablelength);
19         SSquare glass = new SSquare(glasslength);
20         SCircle coaster = glass.circumscribingCircle();
21         double cardlength = 2.25;
22         double cardwidth = 3.5;
23         SRectangle cards = new SRectangle(cardlength, cardwidth);
24         double ObjectArea = ( ( coaster.area() * 4) + ( cards.area() * 2 ) );
25         double BlackArea = ( table.area() - ObjectArea );
26         System.out.println("Black area = " + BlackArea  + " inches squared");
27     }
28 }
29