ShippingContainer.java
1    package shapes;
2    import java.util.Scanner;
3    public class ShippingContainer {
4    //program to compute the diagonal of the shipping container
5        public static void main(String[] args)
6        {
7            System.out.println("input width:");
8            Scanner scan= new Scanner(System.in);
9            double width=scan.nextDouble();
10           System.out.println("input Length:");
11           double length=scan.nextDouble();
12           System.out.println("input Height:");
13           double height=scan.nextDouble();
14   
15           SRectangle container=new SRectangle(width,length);
16          double diagonal1= container.diagonal();
17   
18   
19          SRectangle curtain=new SRectangle(height,diagonal1);
20          double key=curtain.diagonal();
21   
22           System.out.println("container diagonal: "+ key);
23       }
24   }
25