SHSubjectHub

Method Overriding and Polymorphism (Python)

OOPA-levelLesson packSubscription

About this resource

Learn how subclasses can replace a parent method with their own version, and how polymorphism lets you write code that works with any subclass.

11 slides.

Lesson outline

  1. Same Method, Different Result
  2. Method Overriding
  3. Extending with `super().method()`
  4. Polymorphism — One Interface, Many Behaviours
  5. Polymorphism in Action: Live Demo
  6. UML: Shape Hierarchy with Overrides
  7. Trace: Which Method Runs?
  8. Coding Practice: Shapes + Employees
  9. Lesson Summary
Unit bundleUnit 3B · Method Overriding and Polymorphism
Part of: Unit 3B · Method Overriding and Polymorphism: the whole unitEvery resource in the unit in one zip.

More from Unit 3B · Method Overriding and Polymorphism