Created
February 15, 2021 18:13
-
-
Save anjanashankar9/0f0cd2c40bcbdaddc4efbb576db5aff8 to your computer and use it in GitHub Desktop.
The abstract Shape Decorator class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class ShapeDecorator implements Shape{ | |
protected Shape decoratedShape; | |
public ShapeDecorator(Shape decoratedShape){ | |
this.decoratedShape = decoratedShape; | |
} | |
public void draw(){ | |
decoratedShape.draw(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment