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