Please enable JavaScript to use CodeHS

PCAP Certification Prep

Advanced OOP

Class and instance variables, name mangling, introspection, and multiple inheritance with the MRO.

Lessons

5.1 Instance and Class Variables

  • Instance and Class Variables
  • Class Variables and __dict__
  • Pet Registry
  • Fix the Bug: Pet Counter
  • Fix the Bug: Missing Parent Constructor
  • +1 more

5.2 Private Attributes and Name Mangling

  • Private Attributes and Name Mangling
  • Name Mangling in Action
  • Protect the Balance
  • Fix the Bug: Private Access
  • Quick Check: Name Mangling

5.3 Introspection

  • Introspection
  • Inspecting Classes and Objects
  • Describe the Class
  • Fix the Bug: hasattr Argument
  • Quick Check: Introspection

5.4 Multiple Inheritance and the MRO

  • Multiple Inheritance and the MRO
  • Diamond Resolution
  • Multiple Inheritance Mixer
  • Fix the Bug: Missing Instance
  • Quick Check: Multiple Inheritance

5.5 Polymorphism and __str__

  • Polymorphism and __str__
  • Shapes with __str__
  • Payroll Polymorphism
  • Fix the Bug: __str__ Returns Nothing
  • Quick Check: Polymorphism and __str__

5.6 OOP Quiz

  • Advanced OOP Quiz

Courses that include this module