/* * A program to write a Java program called ShippingContainer */ package shapes; import java.util.Scanner; public class ShippingContainer { public static void main (String [] args ){ Scanner scanner = new Scanner(System.in); int width = scanner.nextInt(); int length = scanner.nextInt(); int height = scanner.nextInt(); System.out.println(" width = " + width + "\n length = " + length +"\n height = " + height); SRectangle face = new SRectangle(height,length); double keylength = face.diagonal(); SRectangle key = new SRectangle(width,keylength); double distance = key.diagonal(); System.out.println(" The distance between two far corners of the container = " + distance); } }