1 package shapes; 2 3 /* 4 * ShapesThing affords opportunities to explore the computational solution to simple geometrical problems by means of the construction 5 * use of basic shapes 6 */ 7 public class ShapesThing { 8 9 public static void main(String[] args) { 10 SSquare square= new SSquare(400*400); 11 System.out.println("area of sqaure=" + square.toString()); 12 System.out.println("area of square= "+ square.area()); 13 System.out.println("perimeter of square="+ square.perimeter()); 14 System.out.println("diagonal of sqaure="+ square.diagonal()); 15 SCircle disk= square.inscribingCircle(); 16 System.out.println("disk="+ disk.toString()); 17 System.out.println("area of disk="+ disk.area()); 18 System.out.println("perimeter of disk="+ disk.perimeter()); 19 SSquare diamond= disk.inscribingSquare(); 20 System.out.println("diamond="+ diamond.toString()); 21 System.out.println("area of diamond="+diamond.area()); 22 23 24 25 26 27 28 29 30 } 31 32 33 } 34 35 36