O'Reilly logo

Mac Programming for Absolute Beginners by Wallace Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required