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