ShippingContainer.java
1    package shapes;
2    
3    import shapes.SRectangle;
4    import java.util.Scanner;
5    
6    public class ShippingContainer {
7    
8        public static void main(String[] args) {
9            Scanner scanner = new Scanner(System.in);
10           System.out.print("Height of the shipping container: ");
11           int height = scanner.nextInt();
12           System.out.print("Length of shipping container: ");
13           int length = scanner.nextInt();
14           System.out.print("Width of the shipping conatiner ");
15           int width = scanner.nextInt();
16           SRectangle face = new SRectangle(height,width);
17           SRectangle key = new SRectangle(width,face.diagonal());
18           double distance = key.diagonal();
19           System.out.println("The longest object that can be put in the container diagonally is: " + distance);
20       }
21   }