Chapter 8. Objects
This chapter examines how you define, initialize, and use objects. It lays a foundation of what objects are and how object-oriented (OO) programming works by covering the following topics:
Defining and using objects
Defining and instantiating objects
Defining and using variables, constants, and operations
Getters and setters
Defining and using inheritance and polymorphism
Building subclasses and overriding operations
Using abstract classes and interfaces
Implementing objects
Cloning objects
Comparing objects, printing objects, and type hinting
Using object reflection
As discussed in the last chapter, procedural programming functions perform well-defined tasks, and they hide the details of their operation. A collection of functions can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access