...

/

Challenge: Decorator Pattern

Challenge: Decorator Pattern

In this challenge, you have to implement the decorator pattern to solve the given problem.

We'll cover the following...

Problem statement

The code below implements the functionality that customizes superheroes for a game. If you study the code below, you’ll see that every superhero has a power. However, you can also create superheroes that have the following in addition to the power:

  • a sword

  • ...