package shapes; import shapes.SRectangle; import java.util.Scanner; import javax.swing.*; import java.awt.*; public class ShippingContainer { public static void main(String[] args) { Scanner dimensions = new Scanner(System.in); System.out.println( " Enter the width, length and height of the Shipping Container"); double width = dimensions.nextDouble(); double length = dimensions.nextDouble(); double height = dimensions.nextDouble(); SRectangle face = new SRectangle(length, width); double dia1 = face.diagonal(); SRectangle key = new SRectangle(dia1, height); double distance = key.diagonal(); System.out.println( " The longest object that can fit into the container diagonally is;" +distance); } }