ShapesThing.java
1    /* 
2        This program lets us explore solutions to simple geometrical problems 
3        by the means of the construction and use of basic shapes 
4     */
5    
6    package shapes;
7    
8    public class ShapesThing {
9    
10       public static void main (String[] args){
11           //Task 8: Computations on a square
12           SSquare square = new SSquare(400);
13           System.out.println("square = " + square.toString());
14           System.out.println("area of square = " + square.area());
15           System.out.println("perimeter of the square = " + square.perimeter());
16           System.out.println("diagonal of the square = " + square.diagonal());
17   
18           //Task 9: Computations on a circle
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           //Task 10: Computations on a another square
25           SSquare diamond = disk.inscribingSquare();
26           System.out.println("diamond = " + diamond.toString());
27       }
28   }
29