Chapter    4

Introduction to Object-Oriented Programming

If you have any experience with programing, chances are good you’ve at least heard the term object-oriented programming, OOP for short. This is one of the techniques used when programming, along with structured and functional programming.

OOP was developed for writing simulation programs, but because the benefits of the technique became readily apparent, it was soon adapted for writing general-purpose programs.

OOP is a way to construct objects that perform specialized tasks in tandem with other objects, by communicating with each other using defined interfaces. This chapter provides an overview of OOP’s concepts and principles.

I’ll be using some terms that require explanation, so before ...

Get Learn Swift on the Mac: For OS X and iOS 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.