ShippingContainer.java
1    package shapes;
2    
3    import java.util.Scanner;
4    
5    public class ShippingContainer {
6    
7        public static void main(String[] args) {
8    
9            System.out.println("Enter the dimensions of the shipping container...");
10           Scanner scan = new Scanner(System.in);
11   
12           System.out.print("Height of the container: ");
13           int height = scan.nextInt();
14   
15           System.out.print("Width of the container: ");
16           int width = scan.nextInt();
17   
18           System.out.print("Depth of the container: ");
19           int depth = scan.nextInt();
20           
21           SRectangle diagonalFace = new SRectangle(height, Math.sqrt((width * width) + (depth * depth)));
22   
23           double diagonal = diagonalFace.diagonal();
24   
25           System.out.println("The diagonal of the shipping container is: " + diagonal);
26   
27       }
28   
29   }
30