1 package shapes; 2 3 import java.util.Scanner; 4 5 public class ShippingContainer { 6 7 public static void main(String[] args) { 8 9 Scanner scan = new Scanner(System.in); 10 System.out.print("Enter Shipping Container Width: "); 11 int width = scan.nextInt(); 12 13 System.out.print("Enter Shipping Container Length: "); 14 int length = scan.nextInt(); 15 16 System.out.print("Enter Shipping Container Height: "); 17 int height = scan.nextInt(); 18 19 20 SRectangle face = new SRectangle(length,width); 21 double DiagFace = face.diagonal(); 22 SRectangle key = new SRectangle(height,DiagFace); 23 double distance = key.diagonal(); 24 System.out.println("The distance from one corner of the shipping container on the floor to its far corner on the ceiling is ---> " + distance); 25 26 } 27 } 28 29 30 31 32 33 34 35 36 /*System.out.println("The values of the read integers are:"); 37 System.out.println("Width---> " + width); 38 System.out.println("Length---> " + length); 39 System.out.println("Height---> " + height); 40 */ 41 42 //length times width gets the top and bottom 43 //use that to find diagnol of that rectangle 44 //TopRecHeight = (length); 45 //TopRecWidth is width 46 47 48 //Find diagnol of the face 49 //bind to variable called DiagFace 50 // this DiagFace is the new width 51 // // Height of this curtain thing is the orginal hieght typed in 52 // //now use that key to find the diagnol of that to get the disired distance 53 // //that is the solution? 54 // //Bind it to a variable called distance of interest 55 // //this is the Top of one corner the the bottom of the opposite corner of the container 56 //