CHAPTER 9
Objects and Classes
Objectives
- To describe objects and classes, and use classes to model objects (§9.2).
- To define classes with data fields and methods (§9.2.1).
- To construct an object using a constructor that invokes the initializer to create and initialize data fields (§9.2.2).
- To access the members of objects using the dot operator (.) (§9.2.3).
- To reference an object itself with the self parameter (§9.2.4).
- To use UML graphical notation to describe classes and objects (§9.3).
- To use the datetime class from the Python library (§9.4).
- To distinguish between immutable and mutable objects (§9.5).
- To hide data fields to prevent data corruption and make classes easy to maintain (§9.6).
- To apply class abstraction and encapsulation ...
Get Introduction to Python Programming and Data Structures, 3rd Edition by Pearson 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.