package shapes; import shapes.SRectangle; import java.util.Scanner; public class ShippingContainer { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Input the width of container: "); double width = scanner.nextDouble(); System.out.print("Input the length of container: "); double length = scanner.nextDouble(); System.out.print("Input the height of container: "); double height = scanner.nextDouble(); System.out.println("dimensions of container are:"); System.out.println("The width --> " + width); System.out.println("The length --> " + length); System.out.println("The height --> " + height); SRectangle face = new SRectangle(width, length); System.out.println("face = " + face.toString()); SRectangle key = new SRectangle(face.diagonal(), height); System.out.println("key = " + key.toString()); double distance = key.diagonal(); System.out.println("The distance between two far corners of the container = " + distance); } }