1 /* 2 *Geometrical problems by using basic shapes. 3 */ 4 5 package shapes; 6 7 public class ShapesThing { 8 public static void main(String[] args) { 9 SSquare square = new SSquare(400); 10 System.out.println("square = " + square.toString()); 11 System.out.println("area of square = " + square.area()); 12 System.out.println("perimeter of square = " + square.perimeter()); 13 System.out.println("diagonal of square = " + square.diagonal()); 14 SCircle disk = square.inscribingCircle(); 15 System.out.println("disk = " + disk.toString()); 16 System.out.println("area of disk = " + disk.area()); 17 System.out.println("perimeter of disk = " + disk.perimeter()); 18 SSquare diamond = disk.inscribingSquare(); 19 System.out.println("diamond = " + diamond.toString()); 20 System.out.println("area of diamond = " + diamond.area()); 21 } 22 } 23