WorkArea.java
1    /* 
2    Program to create a workspace 
3    -One desk 
4    -Two books 
5    -Five plates 
6    -Three soda cans 
7    -Three coasters 
8     */
9    
10   package shapes;
11   
12   public class WorkArea {
13       public static void main(String[] args) {
14   
15   // Introduction of Variables
16           int deskHeight = 26;
17           int deskWidth = 60;
18           int bookHeight = 10;
19           int bookWidth = 7;
20           double canRadius = 1.25;
21           double plateRadius = 5.5;
22   
23           SRectangle desk = new SRectangle (deskHeight, deskWidth);
24           SRectangle book = new SRectangle (bookHeight, bookWidth);
25           SCircle can = new SCircle (canRadius);
26           SSquare coaster = can.circumscribingSquare();
27           SCircle plate = new SCircle (plateRadius);
28   
29           double objectsArea = plate.area() + plate.area() + plate.area() + plate.area() + plate.area() + book.area() + book.area() + coaster.area() + coaster.area()+ coaster.area();
30           System.out.println("Area of Objects = " + objectsArea);
31           double deskSpaceArea = desk.area() - objectsArea;
32           System.out.println("Area of workspace = " + deskSpaceArea);
33           //display the surface area of the desk that is not obscured by any object//
34       }
35   }
36