In the previous chapters when you were working with strings (
NSString), arrays (
NSArray), dictionaries (
NSDictionary), and sets (
NSSet), you were working with predefined classes that Apple's programmers have already created. Although it's entirely possible to write fairly sophisticated programs using the predefined classes stored in the Cocoa framework, chances are good you'll need to create custom classes for your own programs, which means you need to know how to create your own classes.
A class defines the properties (data) and subprograms (methods) that work together in isolation from the rest of your program. The basic idea behind a class is to act as a modular building block to create a larger program. ...