Search⌘ K
AI Features

Exercise: Decorator Design Pattern

Explore how to apply the Decorator design pattern by implementing a BorderShape class that inherits from Shape. Learn to override methods to include border dimensions and descriptions, enhancing object behavior dynamically with composition.

We'll cover the following...

Problem statement

Write a BorderShape class that inherits from the Shape class, which will represent a shape with a border ...