References#
Lecture 6
ENPM605 – L6: Object-Oriented Programming I
Covers OOP principles (encapsulation, abstraction, inheritance, polymorphism), design phase (requirement analysis, business rules, noun/verb analysis, UML modeling), classes and objects, self, __init__, instance and class attributes, dunder methods (__str__, __repr__, __eq__, __add__, __contains__, __iter__, __call__), operator overloading, abstraction, encapsulation, and @property decorators.
Python Language References
Python Tutorial
Official tutorial covering classes, objects, inheritance, and Python’s object model.
Python Data Model
Comprehensive reference for all dunder methods in Python’s data model.
propertyBuilt-in Functions
Documentation for the property() built-in and the @property decorator.
Standard Library – abc
The abc module for defining abstract base classes and abstract methods.
Python Tutorial
Official tutorial on exception handling, try/except, raise, and built-in exception types.
__slots__Python Glossary
Memory-efficient attribute storage using __slots__ (advanced topic).
UML and Design Resources
Official UML Site
The standard for software modeling diagrams used in the design phase.
PlantUML
Text-based tool for creating UML diagrams from simple markup.
Mermaid
JavaScript-based diagramming tool with Markdown integration.
Style and Best Practices
Coding Conventions
Guidelines for class naming, attribute access, and code formatting.
Google Style Guide
Style conventions used in this course for docstrings and code organization.
External Tutorials
Real Python
Comprehensive introduction to OOP in Python with practical examples.
Real Python
Guide to overloading operators and built-in functions for custom classes.
Real Python
In-depth guide to the @property decorator and managed attributes.
Real Python
Guide to inheritance and composition in Python. Preview for L7.
Recommended Reading
Getting Started
Section 9 (Classes) covers class definition, scopes, inheritance, and iterators.
Fluent Python (2nd Edition)
Chapters 11-14 cover the Python data model, special methods, operator overloading, and interfaces. Essential reading for understanding how Python objects work.
Learning Python (5th Edition)
Chapters 26-32 cover OOP fundamentals: class coding basics, inheritance, class design, and advanced class topics.
Effective Python (2nd Edition)
Items 37-44 cover classes and inheritance, including @property, descriptors, and metaclasses.