/* * Program to paint a blue dot in the context of the nonrepresentational * Painting world, NPW */ package shapes; import java.util.Scanner; public class ShippingContainer { public static void main(String[] args) { //asking and declaring dimensions Scanner scan = new Scanner (System.in); System.out.println("Please enter the width of the shipping container: "); double containerWidth = scan.nextDouble(); System.out.println("Please enter the length of the shipping container: "); double containerLength = scan.nextDouble(); System.out.println("Please enter the height of the shipping container: "); double containerHeight = scan.nextDouble(); //computing max length ("key") of an item SRectangle face = new SRectangle(containerLength, containerWidth); SRectangle key = new SRectangle(face.diagonal(), containerHeight); double distance = key.diagonal(); //result System.out.println("Max length of an item: " + distance); } }