19 Object-Oriented Programming
So far, as a user, you’ve worked with various objects, such as strings, lists, dictionaries, file objects, and many more. In this chapter, we’ll show you how you can define your own objects that are customized according to your personal requirements. The term object-oriented programming describes a programming paradigm that can be used to ensure the consistency of data objects and improve the reusability of source code. These advantages are achieved by combining data structures and the associated operations into one object and allowing access to these structures only via specific interfaces.
We’ll illustrate this approach with an example by first developing a solution in the previous way and then implementing it ...
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