1 package shapes; 2 import javax.swing.SwingUtilities; 3 public class WorkArea { 4 public static void main(String[] args) { 5 //Given Constants 6 double deskH = 24; 7 double deskW = 36; 8 double bookH = 8.5; 9 double bookW = 11; 10 double cRadius = 1.35; 11 double pRadius = 8; 12 double numBooks = 2; 13 double numCup = 3; 14 double numCstr = numCup; 15 double numPlate = 3; 16 //Define variables 17 SRectangle desk = new SRectangle(deskH, deskW); 18 SRectangle book = new SRectangle(bookH, bookW); 19 SCircle cup = new SCircle(cRadius); 20 SSquare Cstr = cup.circumscribingSquare(); 21 SCircle plate = new SCircle(pRadius); 22 //Area Calculations 23 double totalDeskAREA = desk.area(); 24 double totalCstrAREA = (Cstr.area()*numCstr); 25 double totalBookAREA = (book.area()*numBooks); 26 double totalPlateAREA = (plate.area()*numPlate); 27 //Final calc and Print 28 int FNLarea = ((int)totalDeskAREA - ((int)totalBookAREA + (int)totalCstrAREA + (int)totalPlateAREA)); 29 System.out.println("Area remaining on the messy desk = " + FNLarea + " Square Inches"); 30 } 31 } 32