Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created February 15, 2021 18:11
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/f6dfabcc20176de3bd768343000e7ffe to your computer and use it in GitHub Desktop.
Save anjanashankar9/f6dfabcc20176de3bd768343000e7ffe to your computer and use it in GitHub Desktop.
Concrete classes - decorator pattern
public class Circle implements Shape {
@Override
public String draw() {
return "This is a circle !!!";
}
}
public class Rectangle implements Shape {
@Override
public String draw() {
return "This is a Rectangle !!!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment