ShippingContainer.java
1    package shapes;
2    import java.util.Scanner;
3    import shapes.SRectangle;
4    /* 
5     *Program to put shit in a container 
6     */
7    public class ShippingContainer {
8        public static void main(String[] args){
9            //Inputs
10           Scanner scan = new Scanner(System.in);
11           System.out.println("Enter height of container ");
12           double contHeight = scan.nextDouble();
13           System.out.println("Enter width of container ");
14           double contWidth = scan.nextDouble();
15           System.out.println("Enter length of container ");
16           double contLength = scan.nextDouble();
17   
18           //Computations
19           //SRectangle frontView = new SRectangle(contHeight, contWidth);
20           SRectangle face = new SRectangle(contWidth, contLength);
21           double diag1 = face.diagonal();
22           SRectangle curtain = new SRectangle(contHeight, diag1);
23           double key = curtain.diagonal();
24           System.out.println("Distance between two far corners of the container: " + key);
25       }
26   }
27