MCPcopy Create free account
hub / github.com/ashishps1/awesome-low-level-design / Rectangle

Class Rectangle

design-patterns/java/bridge/Rectangle.java:1–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1public class Rectangle extends Shape {
2 private final float width;
3 private final float height;
4
5 public Rectangle(Renderer renderer, float width, float height) {
6 super(renderer);
7 this.width = width;
8 this.height = height;
9 }
10
11 @Override
12 public void draw() {
13 renderer.renderRectangle(width, height);
14 }
15}

Callers 1

bridge_demoFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected