Am I understanding this correctly?
My logic/questions are in the comments. Thanks in advance.
public class BoxTester
public static void main (Stringargs)
Scanner keyboard = new Scanner(System.in);
double height = 0;
double width = 0;
double depth = 0;
System.out.print("Please enter the height, width, depth ie 4 5 6: ");
height = keyboard.nextDouble();
width = keyboard.nextDouble();
depth = keyboard.nextDouble();
/**The code below tells the BoxTester program that box is going to be a Box object.
* = new Box calls the Constructor of the Box class and states that there is a new
* instance of itself.
* box can now be used as a reference to anything we wish to do with this object.
* Box() accepts the values of the user input ie (height = keyboard.nextDouble()), etc. and
* places them in the order specified ie Box(height, width, depth) <-- parameters?.
* It then passes those variables and their values (arguments?) to .GetSurfaceArea and .GetVolume.
Box box = new Box(height, width, depth);
System.out.println("Surface Area: " + box.GetSurfaceArea()); //calls the .GetSurfaceArea method from the Box class
System.out.println("Volume: " + box.GetVolume()); //calls the .GetVolume method from the Box class