WorkArea.java
1    package shapes;
2    
3    public class WorkArea {
4        public static void main(String[] args) {
5    
6            int deskWidth = 36;
7            int deskLength = 24;
8            double bookWidth = 8.5;
9            int bookLength = 11;
10           double glassRadius = 1.35;
11           int plateRadius = 8;
12           SCircle plate = new SCircle(plateRadius);
13           SCircle glass = new SCircle(glassRadius);
14           SRectangle desk = new SRectangle(deskLength, deskWidth);
15           SRectangle book = new SRectangle(bookLength, bookWidth);
16           SSquare coaster = glass.circumscribingSquare();
17   
18           System.out.println("area of desk = " + desk.area());
19           System.out.println("area of 2 books = " + (book.area() * 2));
20           System.out.println("area of 3 coasters = " + (coaster.area() * 3));
21           System.out.println("area of 3 plates = " + (plate.area() * 3));
22           System.out.println("area of the glass = " + (glass.area() * 3));
23           System.out.println("Total area of the objects taking up space = " + (((book.area() * 2) + (coaster.area() * 3)) + (plate.area() * 3)));
24           System.out.println("Area of the free space in the desk " + (desk.area()-(((book.area() * 2) + (coaster.area() * 3)) + (plate.area() * 3))));
25       }
26   }
27