MessyDesk.java
1    package shapes;
2    
3    import painter.SPainter;
4    
5    public class MessyDesk {
6        public static void main(String[] args) {
7            //variables
8            double deskLength = (66);
9            double deskWidth = (153);
10           double bookLength = (21);
11           double bookWidth = (29.7);
12           double manualLength = (25.4);
13           double manualWidth = (30.48);
14           double sodaRadius = (2.52);
15           double platesRadius = (10.3);
16   
17           SRectangle desk = new SRectangle(deskLength, deskWidth);
18           System.out.println("desk" + deskLength + deskWidth);
19   
20           SRectangle book = new SRectangle(bookLength, bookWidth);
21           System.out.println("book" + bookLength + bookWidth);
22   
23           SRectangle manual = new SRectangle(manualLength, manualWidth);
24           System.out.println("manual" + manualLength + manualWidth);
25   
26           SCircle soda = new SCircle(sodaRadius);
27           System.out.println("soda" + sodaRadius);
28   
29           SCircle plates = new SCircle(platesRadius);
30           System.out.println("plates" + platesRadius);
31   
32           SSquare coaster = soda.circumscribingSquare();
33   
34           double deskArea = desk.area();
35           double bookArea = book.area();
36           double manualArea = manual.area();
37           double coasterArea = coaster.area();
38           double platesArea = plates.area();
39   
40   
41           double overallbookArea = bookArea * 2;
42           System.out.println("BooksArea =" + bookArea);
43           double overallcoasterArea = coasterArea * 3;
44           System.out.println("CoastersArea =" + overallcoasterArea);
45           double overallplatesArea = platesArea * 9;
46           System.out.println("PlatesArea =" + overallplatesArea);
47           double overallmanualArea = manualArea *1;
48           System.out.println("ManualArea =" + manualArea);
49   
50           double overalldeskArea = deskArea - (overallcoasterArea + overallplatesArea + overallbookArea + overallmanualArea);
51           System.out.println("DeskArea =" + overalldeskArea);
52   
53   
54       }
55   }