Creating Instances of 3D Points for Minor #3

I strongly recommend that you implement the @ method in the Smalltalk minor assignment in the following way, which is modeled exactly on the way Point creates 2D point instances. Remember, for Point, @ is sent to a Number with a Number argument, but for Point3D @ is sent to a Point with a Number argument.

What's really happening here? Instances are created by sending messages to the class object for a class. So, we want to send a method to the class object Point3D to create a 3D point object. But the x:y:z: class object can't access instance variables, for two reasons. At first, it's because no instance exists. Next, it's because it's not an instance of a 3D point, so it doesn't have any instance variables! So, the only way it can set the coordinates is to ask the newly created instance to set them itself. This is exactly what the setX:setY:setZ: method does; it's "private", though, since it shouldn't generally be used. The @ method you'll define is pretty straightforward, so I won't discuss it here (but make sure to ask questions if you're still confused).

So, the only outstanding question that's confusing is, what's this

    ^self basicNew setX: xCoord setY: yCoord setZ: zCoord
stuff? Well, self is the Point3D class object (what x:y:z: was sent to). basicNew creates a new instance of class Point3D, and then the setX:setY:setZ: initializes the coordinates.