The following text was written to the standard output stream when the BlackArea program was executed from Netbeans.
/* * Displaying the area of a table that is not obscured by some object */ package shapes; /** * * @author dmaslows */ public class BlackArea { /** * @param args the command line arguments */ public static void main(String[] args) { double sidelength = 39.0; double cardlength = 2.25; double cardwidth = 3.5; double glasseswc = 2.1; SSquare table = new SSquare (sidelength); SRectangle cards = new SRectangle (2*cardlength,cardwidth); SSquare glass = new SSquare (glasseswc); SCircle coaster = glass.circumscribingCircle(); System.out.println("area of table =" +table.area()); System.out.println("area of redcards =" +cards.area()); System.out.println("area of coaster =" +coaster.area()*4); System.out.println("area of objects =" +((cards.area())+(coaster.area()*4))); double objectsarea = ((cards.area())+(coaster.area()*4)); double emptytablearea = table.area()- objectsarea; System.out.println("empty table area =" +emptytablearea); } }