The init method used with the call to super would be the Rectangle 's init method, since that's the parent class of the Square class. If the Rectangle 's init method has not been overridden, then that will be the init method inherited by the Rectangle class, or NSObject 's init method.

When you return self , you're likely returning the same object that was sent the initWithSide: message (the Square object you allocated). However, the init method does have the "right" to change that object (e.g, move it someplace else, create a new object, etc.), which is why the init call to super takes the returned value, assigns it to self, and then the initWithSide: message returns that value--it could have changed.

the super init uses the NSObject's init (when we made Square a composite object, we changed it's parent class from Rectangle to NSObject).

Square's overritten init is

Code: (Objective-C)

-(id) init{ return [self initWithSide:0];}

So if we use a simple

Code: (Objective-C)

Square *mySquare = [[Square alloc] init];

the super init call still uses the overridden init method above, and not the parent method (as the "super" makes me believe it would do). That's what I still don't get. Why is "super" not bypassing this overridden init method. (I'm glad it doesn't bypass it. I just want to understand why).

Anywho, the way I understand the rest of the methods for this composite object in the following code is:

initwithside sends the side argument to the Rectangle object.All other calculations, setters and getters, are also manipulating the Rectangle object.Throughout it all, the Square object mySquare is just a placeholder, an empty memory address whose only function is to invoke the needed methods and indirectly manipulate the rect instance, and get its returns. All this is "hidden" and it looks like we're using a square object, but the square's methods are using a rectangle object, and the square is only there to call the methods.