1 package shapes; 2 3 public class WorkArea { 4 public static void main(String[] args) { 5 //Constants 6 double deskHeight = 24; 7 double deskWidth = 36; 8 9 double bookHeight = 8.5; 10 double bookWidth = 11; 11 12 double cupRadius = 1.15; 13 double plateRadius = 6; 14 15 double amountOfBooks = 2; 16 double amountOfPlates = 3; 17 double amountOfCoasters = 3; 18 19 //Object Instantiations 20 SRectangle desk = new SRectangle(deskHeight, deskWidth); 21 SRectangle book = new SRectangle(bookHeight, bookWidth); 22 23 SCircle glassCups = new SCircle(cupRadius); 24 SSquare coaster = glassCups.circumscribingSquare(); 25 26 SCircle plate = new SCircle(plateRadius); 27 28 //Area Calculations 29 double netDeskArea = desk.area(); 30 double netBookArea = book.area()*amountOfBooks; 31 double netPlateArea = plate.area()*amountOfPlates; 32 double netCoasterArea = coaster.area()*amountOfCoasters; 33 34 //Desk area occupied and area available 35 double areaCovered = netBookArea + netPlateArea + netCoasterArea; 36 double areaUncovered = netDeskArea - areaCovered; 37 38 //Print Statements 39 System.out.println("-------------------------------------------------"); 40 System.out.println("Desk Area: " + netDeskArea); 41 System.out.println("Area Covered: " + areaCovered); 42 System.out.println("Area Uncovered: " + areaUncovered); 43 System.out.println("-------------------------------------------------"); 44 System.out.println("Calculation: " +netDeskArea + " - " + areaCovered + " = " + areaUncovered ); 45 } 46 } 47 48 49 50