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            Scanner scanner = new Scanner(System.in);
10           System.out.println("Please enter the width ");
11           int width =scanner.nextInt();
12           System.out.println("Please enter the height ");
13           int height =scanner.nextInt();
14           System.out.println("Please enter the length ");
15           int length =scanner.nextInt();
16   
17           double c = Math.pow(length,2) + Math.pow(width,2);
18           double wall = Math.sqrt(c);
19           double diagonal = Math.pow(wall,2) + Math.pow(height,2);
20           double answer = Math.sqrt(diagonal);
21           System.out.println("The distance from one corner to the other is = " + answer);
22       }
23   }