1 package Shapes; 2 3 import shapes.SRectangle; 4 5 import java.util.Scanner; 6 7 public class ShippingContainer { 8 9 public static void main(String[] args) { 10 Scanner scanner = new Scanner(System.in); 11 System.out.print("What is the shipping container width?: "); 12 int width = scanner.nextInt(); 13 14 System.out.print("What is the shipping container height?: "); 15 int height = scanner.nextInt(); 16 17 System.out.print("What is the shipping container length?: "); 18 int length = scanner.nextInt(); 19 20 SRectangle face = new SRectangle(length, width); 21 double Fdiagonal = face.diagonal(); 22 SRectangle key = new SRectangle(Fdiagonal, height); 23 double Distance = key.diagonal(); 24 System.out.print("The diagonal from one corner of the shipping container to the top of the opposite corner is=>" + Distance); 25 26 } 27 28 } 29