WorkArea.java
1    package shapes;
2    
3    public class WorkArea {
4        public static void main(String[] args) {
5            SRectangle desk = new SRectangle(24, 36); // messy desk is 24 inches deep and 36 inches wide
6            SRectangle book = new SRectangle(11, 8.5); // dimensions of 1 book on top of desk (there are two)
7            SCircle glass = new SCircle(1.35); // dimensions of one glass (there are three)
8            SSquare coaster = glass.circumscribingSquare(); // inscribed circle in square (one for each glass)
9            SCircle plate = new SCircle(8); // dimensions for dinner plates (there are three)
10   
11           // Calculating the areas
12   
13           double a = desk.area();
14           System.out.println("Area of Desk = " + (a));
15   
16           double b = (2*book.area());
17           System.out.println("Area of Books = " + (b));
18   
19           double c = (3*coaster.area());
20           System.out.println("Area of Coasters = " + (c));
21   
22           double p = (3*plate.area());
23           System.out.println("Area of Plates = " + (p));
24   
25           double total = (a - b - c - p);
26           System.out.println("Total Area to Study = " + total);
27   
28   
29       }
30   }
31