Skip to content

Intro to Object Oriented Programming Inheritance and Polymorphism

What are we trying to accomplish?

By learning inheritance and polymorphism in Python object-oriented programming (OOP), you are gaining the skills necessary to create more organized, modular, and reusable code. Inheritance allows you to create specialized classes that inherit attributes and behaviors from parent classes, reducing code duplication and promoting a hierarchical structure. Polymorphism enables you to design code that can work with different classes through a common interface, promoting flexibility and adaptability in your applications. Ultimately, mastering these concepts enhances your ability to create efficient, scalable, and maintainable Python programs.

Lectures & Assignment

Lectures

Assignments

TLO's(Terminal Learning Objectives)

  • Utilize Inheritance to Create Flexible Code
  • Utilize Polymorphism to adjust Inherited Methods

ELO's(Enabling Learning Objectives)

  • Understand when and why to use inheritance in your code
  • Understand the relationship between child classes and parent classes
  • Understand the use of super in OOP and when to use it
  • Understand different types of multiple inheritance:
  • one parent with multiple children
  • one child with multiple parents
  • Composition vs Inheritance