Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created February 15, 2021 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/0f0cd2c40bcbdaddc4efbb576db5aff8 to your computer and use it in GitHub Desktop.
Save anjanashankar9/0f0cd2c40bcbdaddc4efbb576db5aff8 to your computer and use it in GitHub Desktop.
The abstract Shape Decorator class
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