1 package Shapes; 2 3 import shapes.SCircle; 4 import shapes.SPolygon; 5 import shapes.SRectangle; 6 import shapes.SSquare; 7 8 public class WorkArea { 9 public static void main(String[] args) { 10 //Given Information 11 int BrownWoodenDeskHeight = 24; 12 int BrownWoodenDeskWidth = 36; 13 double BookHeight = 8.5; 14 int BookWidth = 11; 15 double GlassRadius = 1.35; 16 int DinnerPlateRadius = 8; 17 double SpaceUsed = 556.41; 18 19 //Modelled Situation 20 SRectangle Desk = new SRectangle(BrownWoodenDeskHeight, BrownWoodenDeskWidth); 21 SRectangle Book = new SRectangle(BookWidth, BookHeight); 22 SCircle Glass = new SCircle(GlassRadius); 23 SSquare Coaster = Glass.circumscribingSquare(); 24 SCircle DinnerPlate = new SCircle(DinnerPlateRadius); 25 double AreaofAll = (Desk.area() + Book.area() +Book.area() + Glass.area() + Glass.area() + Glass.area() + Coaster.area() + Coaster.area() + Coaster.area() + DinnerPlate.area() + DinnerPlate.area() + DinnerPlate.area()); 26 27 28 System.out.println("Area of space left on desk"); 29 System.out.println("area of desk =" + Desk.area()); 30 System.out.println("area of book =" + Book.area()); 31 System.out.println("area of glass =" + Glass.area()); 32 System.out.println("area of coaster =" + Coaster.area()); 33 System.out.println("area of dinner plate =" + DinnerPlate.area()); 34 System.out.println("Area of space left to use=" + (SpaceUsed - Desk.area())); 35 System.out.println("Collective Area =" + (AreaofAll)); 36 37 //make a variable and bind it to the area used 38 39 //find the area of everything else then subtract from the area of rectangle 40 41 42 43 44 45 46 } 47 }