1 package shapes; 2 /* 3 * Affords the exploration of the computational solution of geometric shapes 4 * through the use of basic shapes 5 */ 6 7 import shapes.SCircle; 8 import shapes.SSquare; 9 import java.awt.Color; 10 import javax.swing.SwingUtilities; 11 import painter.SPainter; 12 13 public class ShapesThing { 14 15 public static void main(String[] args){ 16 SSquare square = new SSquare (400); 17 System.out.println("square = " + square.toString()); 18 System.out.println("area of square = " + square.area()); 19 System.out.println("perimeter of square = " + square.perimeter()); 20 System.out.println("diagonal of square = " + square.diagonal()); 21 SCircle disk = square.inscribingCircle(); 22 System.out.println("disk =" + disk.toString()); 23 System.out.println("area of disk = " + disk.area()); 24 System.out.println("perimeter of disk = " + disk.perimeter()); 25 SSquare diamond = disk.inscribingSquare(); 26 System.out.println("diamond = " + diamond.toString()); 27 System.out.println("area of diamond = " + diamond.area()); 28 } 29 } 30