Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Implementing custom classes is a great way to organize your application logic into discrete and easily maintainable units. With a well-structured class hierarchy, it should be possible to make significant changes to the internal implementation of a class without affecting other aspects of your code, as long as you keep the same public interface. As an example, you could separate the storage of a rental property’s address into separate street number, street name, suburb, and city instance variables, and then recombine them as part of the setter method for the address property. Users of the CTRentalProperty class wouldn’t need to be aware of this change because the interface of the class wouldn’t have changed.
In the discussions of declared properties, you may have noticed that the same identifier can be used to name multiple elements in a class without causing an error. For example, in an Objective-C class it’s possible for