Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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