1 package shapes; 2 3 import java.util.Scanner; 4 5 public class ShippingContainer { 6 7 public static void main(String[] args) { 8 Scanner scanner = new Scanner(System.in); 9 System.out.println("Container length? "); 10 int length = scanner.nextInt(); 11 System.out.println("Container width? "); 12 int width = scanner.nextInt(); 13 System.out.println("Container height? "); 14 int height = scanner.nextInt(); 15 16 SRectangle face = new SRectangle(length,width); 17 double diagonal = face.diagonal(); 18 SRectangle key = new SRectangle(diagonal,height); 19 double distance = key.diagonal(); 20 21 System.out.println("The distance from a corner to the far corner is " + distance + " units long."); 22 } 23 } 24