1 package shapes; 2 3 import java.util.Scanner; 4 import shapes.SRectangle; 5 6 public class ShippingContainer { 7 8 public static void main(String[] args) { 9 //BIND 10 double length = length(); 11 double width = width(); 12 double height = height(); 13 14 //SHIPPING CONTAINER 15 SRectangle face = new SRectangle(length, width); 16 SRectangle key = new SRectangle(face.diagonal(), height); 17 double distance = key.diagonal(); 18 System.out.println("distance =" + distance); 19 20 21 } 22 23 private static double height() { 24 System.out.println("Enter Height of Shipping Container "); 25 Scanner A = new Scanner(System.in); 26 double height = A.nextDouble(); 27 return height; 28 } 29 30 private static double width() { 31 System.out.println("Enter Width of Shipping Container "); 32 Scanner A = new Scanner(System.in); 33 double width = A.nextDouble(); 34 return width; 35 } 36 37 private static double length() { 38 System.out.println("Enter Length of Shipping Container "); 39 Scanner A = new Scanner(System.in); 40 double length = A.nextDouble(); 41 return length; 42 } 43 }