Advanced OOP

  1. Class count instances
  2. Class Attributes
  3. Class Attributes in Instances
  4. Attributes with method access
  5. Instance Attribute
  6. Methods are class attributes
  7. Monkey patching
  8. Classes: instance method
  9. Class methods and class attributes
  10. Classes: constructor
  11. Class methods - alternative constructor
  12. Abstract Base Class
  13. Abstract Base Class with abc
  14. ABC working example
  15. ABC - cannot instantiate the base-class
  16. ABC - must implement methods
  17. Use Python @propery to fix bad interface (the bad interface)
  18. Use Python @propery to fix bad interface (first attempt)
  19. Use Python @propery to fix bad API
  20. Use Python @propery decorator to fix bad API
  21. Use Python @propery for value validation
  22. class and static methods
  23. Destructor: __del__
  24. Destructor delayed
  25. Destructor delayed for both
  26. Opearator overloading
  27. Operator overloading methods
  28. Exercise: rectangular
  29. Exercise: SNMP numbers
  30. Exercise: Implement a Gene inheritance model combining DNA
  31. Exercise: imaginary numbers - complex numbers
  32. Solution: Rectangular
  33. Solution: Implement a Gene inheritance model combining DNA
  34. Instance counter