1 /* 2 * This program affords 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.SCircle; 9 import shapes.SSquare; 10 11 public class ShapesThing { 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 SCircle disk = square.inscribingCircle(); 19 System.out.println("disk = " + disk.toString()); 20 System.out.println("area of square = " + disk.area()); 21 System.out.println("perimeter of square = " + disk.perimeter()); 22 SSquare diamond = disk.inscribingSquare(); 23 System.out.println("diamond = " + diamond.toString()); 24 } 25 } 26