1 package shapes; 2 3 public class ShapesThing { 4 5 public static void main(String[] args) { 6 //This program affords opportunities to explore the computational solution to simple geometrical problems by 7 //means of the construction and use of basic shapes. 8 SSquare square = new SSquare(400); 9 System.out.println("square = " + square.toString()); 10 System.out.println("area square = " + square.area()); 11 System.out.println("perimeter square = " + square.perimeter()); 12 System.out.println("diagonal of square = " + square.diagonal()); 13 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 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