CS1 Standard Demo Page

The following text was written to the standard output stream when the /* *This code will explore the computational solution to simple geometrical problems * in order to construct basic shapes */ package shapes; public class ShapesThing { public static void main (String[] args ) { SSquare square = new SSquare(400); 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(); 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(); System.out.println("diamond = " + diamond.toString()); System.out.println("area of diamond = " + diamond.area()); } } program was executed from IntelliJ.

square = 
area of square = 160000.0
perimeter of square = 1600.0
diagonal of square = 565.685424949238
disk = 
area of disk = 125663.70614359173
perimeter of disk = 1256.6370614359173
diamond = 
area of diamond = 80000.0