CS1 Standard Demo Page

The following text was written to the standard output stream when the /* Finding the distance */ package shapes; import javax.swing.JOptionPane; public class ShippingContainer { public static void main(String[] args) { Integer height= Integer.valueOf(JOptionPane.showInputDialog(null, "Height?")); System.out.println( "Height = " +height ); Integer length = Integer.valueOf(JOptionPane.showInputDialog(null, "Length?")); System.out.println( "Length = " + length ); Integer width = Integer.valueOf(JOptionPane.showInputDialog(null, "Width?")); System.out.println( "Width = " + width ); SRectangle face = new SRectangle (height,width); double key = face.diagonal(); SRectangle distance = new SRectangle (key,length); double key1 = distance.diagonal(); System.out.println(" distance = " + key1); } } program was executed from IntelliJ.

Height = 5
Length = 5
Width = 5
distance = 8.660254037844387