Chapter 13. Inheritance, Method Overriding, and Events
In the previous chapter, you learned how to create classes and use them to create objects. By using encapsulation to define a class with its own properties and methods, objects can isolate the details of their code from the rest of a program.
Although encapsulation helps improve program reliability, both inheritance and method overriding allow you to reuse existing objects to create more sophisticated programs faster and easier than before. When creating a Mac program, you'll be using the classes stored in the Cocoa framework to give your program the typical functionality of a Mac program without requiring you to write any code at all.
Inheritance lets you reuse an existing object and modify ...
Get Mac Programming for Absolute Beginners now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.