ShippingContainer.java
1    package shapes;
2    
3    import java.util.Scanner;
4    
5    public class ShippingContainer {
6        public static void main(String[] args){
7    
8            Scanner sc = new Scanner(System.in);
9            System.out.println("Enter the length of the Shipping Container = ");
10           int length = sc.nextInt();
11   
12           System.out.println("Enter the width of the Shipping Container = ");
13           int width = sc.nextInt();
14   
15           System.out.println("Enter the height of the Shipping Container = ");
16           int height = sc.nextInt();
17   
18           SRectangle face = new SRectangle(length,width);
19           double curtain = face.diagonal();
20   
21           SRectangle key = new SRectangle(height,curtain);
22           double distance = key.diagonal();
23   
24           //DISPLAY THE RESULT
25           System.out.println("The distance between two far corners of the container is = " + distance + " units");
26   
27   
28       }
29   }
30