ShippingContainer.java
1    package expressions;
2    
3    import shapes.SRectangle;
4    
5    import javax.swing.*;
6    import java.util.Scanner;
7    
8    public class ShippingContainer {
9        private void paintTheImage() {
10           //STOP! SCANNER TIME
11           Scanner scanner = new Scanner(System.in);
12           //PROMPT FOR SCANNER
13           System.out.println("Please enter height...");
14           int height = scanner.nextInt();
15           System.out.println("Please enter width...");
16           int width = scanner.nextInt();
17           System.out.println("Please enter length...");
18           int length = scanner.nextInt();
19   
20           //fuck idk at this point
21           SRectangle face = new SRectangle(height, width);
22           System.out.println(face);
23           double diagonalOfFace = face.diagonal();
24           SRectangle key = new SRectangle(diagonalOfFace, length);
25           double diagonalOfKey = key.diagonal();
26           System.out.println("Key distance = " + diagonalOfKey);
27   
28   
29   
30   
31       }
32   
33       public ShippingContainer() {
34           paintTheImage();
35       }
36       public static void main(String[] args) {
37           SwingUtilities.invokeLater(new Runnable() {
38               @Override
39               public void run() {
40                   new ShippingContainer();
41               }
42           });
43       }
44   }
45