1 package shapes; 2 import shapes.SSquare; 3 import shapes.SCircle; 4 5 import java.util.Scanner; 6 7 public class ShippingContainer{ 8 public static void main(String[] args) { 9 Scanner johnsonDaShaBi = new Scanner(System.in); 10 System.out.println("length of container"); 11 double len = johnsonDaShaBi.nextDouble(); 12 System.out.println("width of container"); 13 double wid = johnsonDaShaBi.nextDouble(); 14 System.out.println("height of container"); 15 double hei = johnsonDaShaBi.nextDouble(); 16 17 SRectangle top = new SRectangle(len,wid); 18 double diaOtop = top.diagonal(); 19 SRectangle curtain = new SRectangle(hei,diaOtop); 20 double key = curtain.diagonal(); 21 22 System.out.println("the length of key =" + key); 23 24 25 } 26 27 } 28