1 /* 2 opportunities to explore the computational solution to simple geometrical problems 3 by means of the construction and use of basic shapes. 4 */ 5 6 package shapes; 7 8 import shapes.SSquare; 9 import shapes.SCircle; 10 11 public class ShapesThing { 12 13 public static void main(String[] args) { 14 SSquare square = new SSquare (400); 15 System.out.println("square = " + square.toString()); 16 System.out.println("area of square = " + square.area()); 17 System.out.println("perimeter of square = " + square.perimeter()); 18 System.out.println("diagonal of square = " + square.diagonal()); 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 SSquare diamond = disk.inscribingSquare(); 24 System.out.println("diamond = " + diamond.toString()); 25 System.out.println("area of diamond = " + diamond.area()); 26 } 27 } 28