1 package shapes; 2 import javax.swing.SwingUtilities; 3 4 public class WorkArea { 5 public static void main(String[] args) { 6 double DeskHeight = 24; 7 double DeskWidth = 36; 8 double TextbookLength = 8.5; 9 double TextbookWidth = 11; 10 double PlateRadius = 8; 11 double CoasterSide = 2.7; 12 13 SRectangle Desk = new SRectangle(DeskHeight , DeskWidth); 14 SRectangle Textbooks = new SRectangle(TextbookLength, TextbookWidth); 15 SCircle Plates = new SCircle(PlateRadius); 16 SCircle Glass = new SCircle(1.35); 17 SSquare Coaster = Glass.circumscribingSquare(); 18 19 20 double DeskArea = Desk.area(); 21 double TextbooksArea = Textbooks.area() * 2; 22 double PlatesArea = Plates.area() * 3; 23 double CoasterArea = Coaster.area() * 3; 24 double GlassArea = Glass.area() * 3; 25 26 System.out.println("Area of Desk without anything: " + DeskArea); 27 System.out.println("Area of Textbooks:" + TextbooksArea ); 28 System.out.println("Area of plates:" + PlatesArea ); 29 System.out.println("Area of Coaster:" + CoasterArea ); 30 System.out.println("Area of Glass:" + GlassArea ); 31 System.out.println("Remaining Area of Desk with everything on it:" + (DeskArea - TextbooksArea - PlatesArea - CoasterArea )); 32 33 } 34 35 } 36 //ASK TA ABOUT GLASS AND COASTER 37 38 /* 39 *Area of Desk without anything: 864.0 40 Area of one Textbook:93.5 41 Area of another Textbook:93.5 42 Area of one plate:201.06192982974676 43 Area of second plate:201.06192982974676 44 Area of third plate:201.06192982974676 45 Area of Coaster:5.725552611167399 46 Area of Desk with everything on it:66.52421051075972 47 */