The following text was written to the standard output stream when the ShippingContainer.java program was executed from IntelliJ.
package shapes;
import java.util.Scanner;
public class ShippingContainer {
public static void main(String[] args) {
double length = length();
double height = height() ;
double width = width();
SRectangle face = new SRectangle(width, length);
int nrOfFaces = 6;
System.out.println("face = " + face);
SRectangle key = new SRectangle(face.diagonal(), height);
System.out.println("key = " + key);
double distance = key.diagonal();
System.out.println("diagonal = " + distance);
}
private static double width() {
System.out.println("Please enter width of container: ");
Scanner scanner = new Scanner(System.in);
double width = scanner.nextDouble();
return width;
}
private static double length() {
System.out.println("Please enter length of container: ");
Scanner scanner = new Scanner(System.in);
double length = scanner.nextDouble();
return length;
}
private static double height() {
System.out.println("Please enter height of container: ");
Scanner scanner = new Scanner(System.in);
double height = scanner.nextDouble();
return height;
}
}