ShippingContainer.java
1    /* 
2    * This program will explore the computational solution to the longest possible object in a shipping container by means of the 
3    * construction and use of basic shapes 
4    */
5    
6    package shapes;
7    import java.util.Scanner;
8    
9    public class ShippingContainer {
10   
11       public static void main(String[] args) {
12   
13           Scanner scanner = new Scanner(System.in);
14           System.out.print("Enter the length of the shipping container: ");
15           double length = scanner.nextDouble();
16           System.out.print("Enter the width of the shipping container: ");
17           double width = scanner.nextDouble();
18           System.out.print("Enter the height of the shipping container: ");
19           double height = scanner.nextDouble();
20           SRectangle top = new SRectangle(width, length);
21           double face = top.diagonal();
22           SRectangle key = new SRectangle(height, face);
23           double distance = key.diagonal();
24           System.out.println("Longest possible object in shipping container diagonally: " + distance + " units");
25           }
26       }
27