Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created February 15, 2021 18:19
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/ee062658141d6fc36a30209583e64b6b to your computer and use it in GitHub Desktop.
Save anjanashankar9/ee062658141d6fc36a30209583e64b6b to your computer and use it in GitHub Desktop.
Decorator Main
public static void main(String[] args) {
Shape c = new Circle();
Shape redCircle = new FillColor(c, "Red");
redCircle.draw();
Shape r = new Rectangle();
Shape thickRectangle = new BorderThickness(r, 2);
thickRectangle.draw();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment