package shapes; /* * Calculate the area of the wooden desk, and the cover area of two books; three glasses with white square coasters and three dinner plates onto the wooden desk. */ public class WorkArea { public static void main(String[] args) { SRectangle WoodenDesk = new SRectangle(24, 36); SRectangle Book = new SRectangle(11, 8.5); double maximumbooksarea = Book.area() * 2; SCircle Glass = new SCircle(1.35); double maximumglassesarea = Glass.area() * 3; SCircle Plate = new SCircle(8); double maximumplatesarea = Plate.area() * 3; SSquare coaster = Glass.circumscribingSquare(); double maximumcoastersarea = coaster.area() * 3; double totalarea = maximumbooksarea + maximumplatesarea + maximumcoastersarea; double restofthedeskarea = WoodenDesk.area() - totalarea; System.out.println("The area of the desk = " + WoodenDesk.area() + "square inchs"); System.out.println("The area of the two books = " + maximumbooksarea + "square inchs"); System.out.println("The area of the three plates = " + maximumplatesarea + "square inchs"); System.out.println("The area of the three coastersarea = " + maximumcoastersarea + "square inchs"); System.out.println("The area of the total area = " + totalarea + "square inchs"); System.out.println("The area of the desk doesn't covered by items = " + restofthedeskarea + "square inchs"); } }