3. Given the following code snippet using the Bridge pattern, what will be the output?
class DrawingAPI {
drawCircle(x, y, radius) { console.log(`API drawing circle at (${x},${y}) with radius ${radius}`); }
}
class Shape {
constructor(drawingAPI) { this.drawingAPI = drawingAPI; }
draw() {}
}
class Circle extends Shape {
constructor(x, y, radius, drawingAPI) {
super(drawingAPI);
this.x = x; this.y = y; this.radius = radius;
}
draw() {
this.drawingAPI.drawCircle(this.x, this.y, this.radius);
}
}
const api = new DrawingAPI();
const circle = new Circle(5, 10, 7, api);
circle.draw();