WorkArea.java
1    package shapes;
2    
3    import javax.swing.SwingUtilities;
4    
5    public class WorkArea {
6    
7        public static void main(String[] args) {
8    
9            /* 
10           desk 24 deep 36 wide 
11           book 8.5 by 11 
12           plate 8 radius 
13           glass radius of 1.35 is inscribed by the coaster 
14           coaster is square created from the glass 
15           the area of the table that can be used for studying 
16           VARIABLES 
17           */
18   
19           SRectangle WoodenDesk = new SRectangle(24, 36);
20           SRectangle Book = new SRectangle(8.5, 11);
21           SCircle Plate = new SCircle(8);
22           SCircle Glass = new SCircle(1.35);
23           SSquare Coaster = Glass.circumscribingSquare();
24   
25           //AREA
26           double areaOfWoodenDesk = WoodenDesk.area();
27           double areaOfBook = Book.area();
28           double areaPlate = Plate.area();
29           double areaCoaster = Coaster.area();
30   
31   
32   
33           /* 
34           COLLECTIVE AREA OF OBJECTS 
35           2 books, 3 coasters with cups on top of each, and 3 plates 
36           */
37           double CollectiveArea = ((2* areaOfBook) + (3 * areaCoaster) + (3* areaPlate));
38           System.out.println("Collective Area =" + CollectiveArea);
39   
40           //AREA NOT OBSCURED BY OBJECTS AND CAN BE USED TO STUDY
41           double UnobscuredArea = (areaOfWoodenDesk - CollectiveArea);
42           System.out.println("Unobscured Area = " + UnobscuredArea);
43   
44   
45   
46   
47   
48   
49   
50   
51       }
52   }
53