1 package shapes; 2 import java.util.Scanner; 3 public class ShippingContainer { 4 public static void main(String[] args) { 5 6 double height = height(); 7 double width = width(); 8 double length = length(); 9 10 SRectangle face = new SRectangle(length, width); 11 SRectangle key = new SRectangle(face.diagonal(), height); 12 double answer = key.diagonal(); 13 System.out.println("Result = " + answer); 14 15 } 16 private static double height() { 17 Scanner lexi = new Scanner(System.in); 18 System.out.print("Enter the height of the container = "); 19 double height = lexi.nextDouble(); 20 return height; 21 } 22 private static double length() { 23 Scanner lexi = new Scanner(System.in); 24 System.out.print("Enter the length of the container = "); 25 double length = lexi.nextDouble(); 26 return length; 27 } 28 private static double width() { 29 Scanner lexi = new Scanner(System.in); 30 System.out.print("Enter the width of the container = "); 31 double width = lexi.nextDouble(); 32 return width; 33 } 34 } 35