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 8 import java.util.Scanner; 9 10 public class ShippingContainer { 11 12 public static void main(String[] args) { 13 14 Scanner scanner = new Scanner(System.in); 15 16 System.out.print("Enter the length of the shipping container: "); 17 double length = scanner.nextDouble(); 18 19 System.out.print("Enter the width of the shipping container: "); 20 double width = scanner.nextDouble(); 21 22 System.out.print("Enter the height of the shipping container: "); 23 double height = scanner.nextDouble(); 24 25 SRectangle top = new SRectangle(width, length); 26 double face = top.diagonal(); 27 28 SRectangle key = new SRectangle(height, face); 29 30 double distance = key.diagonal(); 31 System.out.println("Longest possible object in shipping container diagonally: " + distance + " units"); 32 } 33 }