1 package shapes; 2 3 import painter.SPainter; 4 import shapes.SCircle; 5 import shapes.SSquare; 6 7 import javax.swing.*; 8 import java.awt.*; 9 10 public class WorkArea { 11 public static void main(String[] args){ 12 // Variables 13 double deskDepth = 24; 14 double deskWidth = 36; 15 double bookWidth = 8.5; 16 double bookDepth = 11; 17 double glassRadius = 1.35; 18 double plateRadius = 8; 19 // Construct Shapes 20 SRectangle desk = new SRectangle(deskDepth, deskWidth); 21 SRectangle book = new SRectangle(bookDepth, bookWidth); 22 SCircle glass = new SCircle(glassRadius); 23 SSquare coaster = glass.circumscribingSquare(); 24 SCircle plate = new SCircle(plateRadius); 25 //Areas 26 double areaOfClutter = ((2*book.area()) + (3*coaster.area()) + (3*plate.area())); 27 double areaOfSpace = (desk.area() - areaOfClutter); 28 //Print Values 29 System.out.println("The area of space is " + areaOfSpace); 30 31 32 33 } 34 } 35