Overview

This module introduces the topic of "design patterns" in object-oriented programming with a look at two such patterns, Inheritance and Composition, and how they can be implemented using Python classes.

Learning Outcomes

After completing this module, students should be able to:

  • Use the inheritance pattern to share functionality among Python classes.

  • Use method overriding to extend Python classes.

  • Use the composition pattern to create classes that make up other classes.

  • Build interfaces that provide access to component objects from the containing object.

  • Understand the importance of careful consideration of use cases and reusability in designing software.

Additional Readings