1 package shapes; 2 3 import shapes.SRectangle; 4 import shapes.SCircle; 5 import shapes.SSquare; 6 import shapes.WorkSpace; 7 8 9 public class WorkSpace { 10 11 public static void main(String[] args) { 12 double deskWidth= 152.0; 13 double deskDepth= 66.0; 14 double notebookWidth= 21.0; 15 double notebookLength=29.7; 16 double manualWidth=25.4; 17 double manualLength=30.48; 18 double canRadius= 3.175; 19 double plateDiameter= 20.0; 20 21 22 SRectangle desk= new SRectangle(deskDepth,deskWidth); 23 SRectangle notebook= new SRectangle (notebookLength,notebookWidth); 24 SRectangle manual= new SRectangle (manualLength, manualWidth); 25 SCircle can= new SCircle (canRadius); 26 SCircle plate= new SCircle (plateDiameter/2); 27 SSquare coaster= can.circumscribingSquare(); 28 29 double collectiveArea= ((notebook.area() * 2)+(manual.area())+ (plate.area() * 6)+ (coaster.area() *3)); 30 double resultArea= (desk.area() - collectiveArea); 31 System.out.println("the area of the desk not obscured by the objects which sit on top of it:" + resultArea); 32 } 33 34 35 } 36