1 /* 2 A program to display the area of the desk which is not obscured by any object and may still be used for studying. 3 */ 4 5 package shapes; 6 7 public class WorkArea { 8 public static void main(String[] args) { 9 SRectangle desk = new SRectangle(24,36); 10 double deskArea = desk.area(); 11 SRectangle book = new SRectangle(8.5,11); 12 double bookArea = book.area()*2; 13 SCircle glass = new SCircle(1.35); 14 SSquare coaster = glass.circumscribingSquare(); 15 double coasterArea = coaster.area()*3; 16 SCircle dinnerPlate = new SCircle(8); 17 double dinnerPlateArea = dinnerPlate.area()*3; 18 double covered = bookArea + dinnerPlateArea + coasterArea; 19 double uncovered = deskArea - covered; 20 System.out.println("The area of the uncovered desk is: " + uncovered + "inches"); 21 22 23 } 24 } 25 26 27