package shapes; import java.util.Scanner; public class ShippingContainer { public static void main(String[] args) { double Length = Length(); double Height = Height(); double Width = Width(); double MaxSizeStorage = MaxSizeStorage(Length, Height, Width); System.out.println("Maximum Length Capacity = " + MaxSizeStorage); } private static double Width() { System.out.println("Please enter the width of the crate: "); Scanner scanner3 = new Scanner(System.in); double Width = scanner3.nextDouble(); return Width; } private static double Height() { System.out.println("Please enter the height of the crate: "); Scanner scanner2 = new Scanner(System.in); double Height = scanner2.nextDouble(); return Height; } private static double Length() { System.out.println("Please enter the length of the crate: "); Scanner scanner1 = new Scanner(System.in); double Length = scanner1.nextDouble(); return Length; } private static double MaxSizeStorage(double Length, double Height, double Width) { SRectangle face = new SRectangle(Length,Height); double twoDimentionalStorage = face.diagonal(); SRectangle MaxStoredSize = new SRectangle(twoDimentionalStorage,Width); double MaxSizeStorage = MaxStoredSize.diagonal(); return MaxSizeStorage; } }