ShippingContainer.java
1    package Shapes;
2    
3    import painter.SPainter;
4    import shapes.SPolygon;
5    import shapes.SRectangle;
6    
7    import java.util.Scanner;
8    
9    public class ShippingContainer {
10       public static void main(String[] args) {
11           Scanner scannerContainerWidth = new Scanner(System.in);
12           System.out.println("Enter a width dimension for the container");
13           double width = scannerContainerWidth.nextDouble();
14           Scanner scannerContainerLength = new Scanner(System.in);
15           System.out.println("Enter a length dimension for the container");
16           double length = scannerContainerLength.nextDouble();
17           Scanner scannerContainerHeight = new Scanner(System.in);
18           System.out.println("Enter a height dimension for the container");
19           double height = scannerContainerHeight.nextDouble();
20           double dimensions = ((0.5 * (width*height)) * length);
21           System.out.println("The dimensions =" + dimensions);
22   
23           SRectangle face = new SRectangle(height,length);
24           double diagonalOfFace = face.diagonal();
25           System.out.println("The diagonal of the face = " + diagonalOfFace);
26           SRectangle key = new SRectangle(diagonalOfFace,width);
27           double distance = key.diagonal();
28           System.out.println("The diagonal of the largest object that will fit  = " + distance);
29       }
30   }
31   
32