1 package shapes; 2 3 4 import shapes.SRectangle; 5 import java.util.Scanner; 6 7 public class ShippingContainer { 8 9 public static void main (String [] args) { 10 11 //Asks input for length, width, and height of rectangle 12 Scanner input = new Scanner(System.in); 13 System.out.print("Enter the rectangles width: "); 14 double width = input.nextDouble(); 15 16 System.out.print("Enter the rectangles length: "); 17 double length = input.nextDouble(); 18 19 System.out.print("Enter the rectangles height: "); 20 double height = input.nextDouble(); 21 22 //Create container 23 SRectangle face = new SRectangle(height, length); 24 25 double containerDiagonal = face.diagonal(); 26 double distance = (containerDiagonal); 27 28 System.out.println("length of the longest object that can fit = " + distance); 29 } 30 } 31