The following text was written to the standard output stream when the TheRoom program was executed from Netbeans.
/* * Computing the distance from one corner of a rectangular room to its far corner */ package shapes; /** * * @author dmaslows */ public class TheRoom { /** * @param args the command line arguments */ public static void main(String[] args) { double height = 9.0; double width = 14.0; double length = 21.0; SRectangle roomwall = new SRectangle(height,width); SRectangle face = new SRectangle(length,width); System.out.println("face =" +face); System.out.println("roomwalls =" +roomwall); double key = face.diagonal(); SRectangle curtain = new SRectangle(key,height); double distance = curtain.diagonal(); System.out.println("Key =" +key); System.out.println("Distance =" +distance); } }