This project focuses on deepening understanding of Object-Oriented Programming (OOP) in Python, emphasizing the creation and manipulation of classes and objects. It explores advanced topics like class vs. instance attributes, method types (classmethods and staticmethods), property decorators, and special methods like __str__
and __repr__
.
- Grasp the essence of OOP, class, object, and instance differences.
- Understand attributes and methods, including special methods like
__init__
. - Master data encapsulation, abstraction, and information hiding.
- Distinguish between class and object attributes.
- Utilize property decorators for data encapsulation.
- Learn to create and use class methods and static methods.
- Python 3.8.5
- Compliance with PEP 8 style guidelines.
- Documentation for each module, class, and method.
- Simple Rectangle: Define an empty
Rectangle
class. - Real Definition of a Rectangle: Enhance
Rectangle
with width and height. - Area and Perimeter: Implement area and perimeter methods.
- String Representation: Define how a
Rectangle
is represented as a string. - Detect Instance Deletion: Customize behavior for instance deletion.
- Number of Instances: Track the number of
Rectangle
instances. - Change Representation: Modify string representation dynamically.
- Compare Rectangles: Add static method to compare rectangles.
- A Square is a Rectangle: Implement a square as a type of rectangle.
This project provides a comprehensive understanding of advanced OOP concepts in Python, laying a solid foundation for more complex programming tasks involving classes and objects.
Note: For detailed implementation and project files, refer to the GitHub Repository.