The following text was written to the standard output stream when the ShapesThing program was executed from Netbeans.
/* * Opportunities to explore the computational solution to simple geometrical problems by means of the construction and use of basic shapes */ package shapes; import java.awt.Color; import painter.SPainter; import shapes.SSquare; import shapes.SCircle; /** * * @author dmaslows */ public class ShapesThing { /** * @param args the command line arguments */ public static void main(String[] args) { SPainter wumbo = new SPainter("Square",800,800); SSquare square = new SSquare(400); wumbo.setColor(Color.BLUE); wumbo.draw(square); System.out.println("square = " + square.toString()); System.out.println("area of square = " + square.area()); System.out.println("perimeter of square = " + square.perimeter()); System.out.println("diagonal of square = " + square.diagonal()); SCircle disk = square.inscribingCircle(); wumbo.setColor(Color.RED); wumbo.draw(disk); System.out.println("disk = " + disk.toString()); System.out.println("area of disk = " + disk.area()); System.out.println("perimeter of disk = " + disk.perimeter()); SSquare diamond = disk.inscribingSquare(); wumbo.setColor(Color.BLUE); System.out.println("diamond = " + diamond.toString()); System.out.println("area of diamond = " + diamond.area()); wumbo.tl(45); wumbo.paint(diamond); } }