1 package Shapes; 2 3 import shapes.SRectangle; 4 5 import java.util.Scanner; 6 7 public class ShippingContainer { 8 public static void main(String[]args){ 9 Scanner bob = new Scanner (System.in); 10 System.out.print("Width? "); 11 int width = bob.nextInt(); 12 System.out.print ("Length? "); 13 int length = bob.nextInt(); 14 System.out.print("Height? "); 15 int height = bob.nextInt(); 16 System.out.print(" width = " + width + " length = " + length + " height = " + height); 17 18 19 // Key stuff (Length) 20 SRectangle face = new SRectangle(width,length); 21 double diagonal = face.diagonal(); 22 System.out.println(" diagonal = " + diagonal); 23 24 // Diagonal 25 SRectangle key = new SRectangle(diagonal,height); 26 double distance = key.diagonal(); 27 System.out.println(" distance = " + distance); 28 29 30 31 32 } 33 } 34 35 36