WorkArea.java
1    package Shapes;
2    
3    import shapes.SCircle;
4    import shapes.SRectangle;
5    import shapes.SSquare;
6    
7    public class WorkArea {
8        public static void main (String[]args){
9            SRectangle oakdesk = new SRectangle(26,60);
10           SRectangle books = new SRectangle(7,10);
11           SCircle sodacans = new SCircle(1.25);
12           SSquare coaster = sodacans.circumscribingSquare();
13           SCircle plates = new SCircle(5.5);
14   
15           // Instead of doing the math use .area
16           double areaofdesk = (+oakdesk.area());
17           double areaofstuffondesk = ((+books.area()*2)+(+coaster.area()*3)+(+plates.area()*5));
18           double areaofdeskwhendirty = (+oakdesk.area() - ((+books.area()*2)+(+coaster.area()*3)+(+plates.area()*5)));
19   
20           // Put an extra space next to the text to put a space between it and numbers
21           System.out.println("Area of the desk " +areaofdesk);
22           System.out.println("Objects area " +areaofstuffondesk);
23           System.out.println("Dirty desk area "+areaofdeskwhendirty);
24       }
25   }
26