1 package shapes; 2 import javax.swing.JOptionPane; 3 4 public class ShippingContainer { 5 6 public static void main(String[] args) { 7 Integer height = Integer.valueOf(JOptionPane.showInputDialog(null,"Height?")); 8 System.out.println("Height =" + height); 9 10 Integer length = Integer.valueOf(JOptionPane.showInputDialog(null,"Length?")); 11 System.out.println("Length =" + length); 12 13 Integer width = Integer.valueOf(JOptionPane.showInputDialog(null,"Width?")); 14 System.out.println("Width =" + width); 15 16 SRectangle face = new SRectangle(height,length); 17 double key = face.diagonal(); 18 19 SRectangle distance = new SRectangle(key,height); 20 double key2 = distance.diagonal(); 21 System.out.println("distance =" + key2); 22 23 } 24 } 25