Chapter 17 in brief


Suffix .h: .h is known as the header or interface file that contains the declarations of instance variables & methods.
Suffix .m: .m is known as the implementation file. This is where you write out the steps for, or implement, each method.
Accessors Method: In object-oriented thinking, we do our best to keep the instance variables of an object private; That is, they are known & accessed only by the object itself. However, because we want to give methods & functions outside of an object the ability to set an object’s instance variable we create methods known as the Accessor Methods. A setter method allows other methods to set the value of an instance variable. A getter method allows other methods to read the value of an instance variable. Setter & getter methods are also known as accessor methods, or just accessors.
Objective-C naming convention: The name of the method for reading an instance variable is simply the name of that instance variable.
Dot notation:The forms that uses the period instead of the square brackets is known as dot notation.
Properties:Apple has created a handy way of simplify writing accessor methods called properties. With a property you can declare both the setter & getter methods in one line. In the case when you accessors do nothing special, you can just tell the compiler to synthesize default accessor methods based on each @property declaration.
Self:Inside any method, you have access to the implicit local variable self. Self is a pointer to the object that is running the method. It is used when an object wants to send a message to itself. One of the other usage of it is, we never read or write to an instance variable except using its accessor method. You can also pass self as an argument to let other objects know where the current object is.