package shapes; import java.util.Scanner; /*Shipping container program to compute the distance from one corner */ public class ShippingContainer { public static void main(String[] args){ int width, length, height; Scanner scanner = new Scanner(System.in); System.out.print("Please enter the container's Width, length, and height ,in inches, respectively: "); width = scanner.nextInt(); length = scanner.nextInt(); height = scanner.nextInt(); SRectangle frontFace = new SRectangle(height,width); SRectangle sideFace = new SRectangle(height,length); double distance = frontFace.diagonal() + sideFace.diagonal(); System.out.println("the distance to the two far corners is : " + distance + " inches"); } }