WorkArea.java
1    package shapes;
2    
3    public class WorkArea {
4    /* 
5      * package shapes; 
6    /* 
7     * This program affords opportunities to explore the computational solution to simple geometrical problems by means of the construction and use of basic shapes 
8     */
9    
10   /*public class ShapesThing { 
11    
12       public static void main(String[] args) { 
13           SSquare square = new SSquare(400); 
14           System.out.println("Square = " + square.toString()); 
15           System.out.println("Area of square = " + square.area()); 
16           System.out.println("Perimeter of square = " + square.perimeter()); 
17           System.out.println("Diagonal of square = " + square.diagonal()); 
18    
19           SCircle disk = square.inscribingCircle(); 
20           System.out.println("Disk = " + disk.toString()); 
21           System.out.println("Area of Disk = " + disk.area()); 
22           System.out.println("Perimeter of Disk = " + disk.perimeter()); 
23    
24           SSquare diamond = disk.inscribingSquare(); 
25           System.out.println("diamond = " + diamond.toString()); 
26           System.out.println("Area of Diamond = " + diamond.area()); 
27           System.out.println("Perimeter of Diamond = " + diamond.perimeter()); 
28           System.out.println("Diagonal of Diamond = " + diamond.diagonal()); 
29   */
30   
31   public static void main(String[] args) {
32       SRectangle Desk = new SRectangle(24, 36);
33       SRectangle Books = new SRectangle(8.5, 11);
34       SCircle Glasses = new SCircle (1.35);
35       SCircle Plates = new SCircle (8);
36       SSquare Coasters = Glasses.circumscribingSquare();
37   
38       System.out.println("area of desk = " + Desk.area());
39       System.out.println("area of the books = " + Books.area()*2);
40       System.out.println("area of the glasses = " + Glasses.area());
41       System.out.println("area of the plates = " + Plates.area()*3);
42       System.out.println("area of the coasters = " + Coasters.area()*3);
43       System.out.println("total area of objects = " + ((Books.area()*2 + (Plates.area()*3) + (Coasters.area()*3))));
44       System.out.println("total area of empty space = " + ((Desk.area()) - ((Books.area()*2) + (Plates.area()*3) + (Coasters.area()*3))));
45   
46   
47   
48       }
49   
50   
51   }