/home/ssingh6/NetBeansProjects/CS1/src/shapes/BlackArea.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 ssingh6
11  */
12 public class BlackArea {
13 
14     /**
15      * @param args the command line arguments
16      */
17     public static void main(String[] args) {
18        double sideOfCardTable = 39;
19          double widthOfDeck = 2.25;
20          double lengthOfDeck = 3.5;
21          double sideOfSquareBottomGlass = 2.1;
22          SSquare cardTable = new SSquare(sideOfCardTable);
23          SRectangle deck = new SRectangle(lengthOfDeck,widthOfDeck);
24         SSquare glass = new SSquare(sideOfSquareBottomGlass);
25          SCircle coaster = glass.circumscribingCircle();
26          double collectiveAreaOfObjects = 
27                 (deck.area()*2) + (coaster.area()*4);
28        double areaOfTableNotObscuredByObjects = 
29                  cardTable.area() - collectiveAreaOfObjects;
30          System.out.println(
31                  "The area of the table not obscured by the objects which sit on top "
32                  + "of it = " + areaOfTableNotObscuredByObjects
33                  + " square inches");
34     }
35     
36 }
37