1 package shapes; 2 import java.util.Scanner; 3 public class ShippingContainer { 4 5 public static void main(String[] args) { 6 double RectHeight = RectHeight(); 7 System.out.println(RectHeight); 8 double RectWidth = RectWidth(); 9 System.out.println(RectWidth); 10 double RectDepth = RectDepth(); 11 System.out.println(RectDepth); 12 SRectangle Face = new SRectangle(RectHeight, RectWidth); 13 double RectDiagonal = Face.diagonal(); 14 SRectangle Key = new SRectangle(RectDepth, RectDiagonal); 15 double distance = Key.diagonal(); 16 System.out.println(distance); 17 } 18 19 private static double RectHeight() { 20 System.out.print("Please enter the depth of the rectangle: "); 21 Scanner scanner = new Scanner(System.in); 22 double side1 = scanner.nextDouble(); 23 return side1; 24 } 25 private static double RectWidth() { 26 System.out.print("Please enter the width of the rectangle: "); 27 Scanner scanner = new Scanner(System.in); 28 double side2 = scanner.nextDouble(); 29 return side2; 30 } 31 private static double RectDepth() { 32 System.out.print("Please enter the depth of the rectangle: "); 33 Scanner scanner = new Scanner(System.in); 34 double side3 = scanner.nextDouble(); 35 return side3; 36 37 38 } 39 } 40 41