b'\n_START_ARTICLE_\nBridge pattern\n_START_SECTION_\nEsempio in Java\n_START_PARAGRAPH_\nIl seguente programma stamper\xc3\xa0:_NEWLINE_API1.circle at 1.000000:2.000000 radius 7.5000000_NEWLINE_API2.circle at 5.000000:7.000000 radius 27.500000_NEWLINE_/** "Implementor" */interface DrawingAPI {_NEWLINE_    public void drawCircle(double x, double y, double radius);}/** "ConcreteImplementor"  1/2 */class DrawingAPI1 implements DrawingAPI {_NEWLINE_   public void drawCircle(double x, double y, double radius) {_NEWLINE_        System.out.printf("API1.circle at %f:%f radius %f\\n", x, y, radius);_NEWLINE_   }}/** "ConcreteImplementor" 2/2 */class DrawingAPI2 implements DrawingAPI {_NEWLINE_   public void drawCircle(double x, double y, double radius) {_NEWLINE_        System.out.printf("API2.circle at %f:%f radius %f\\n", x, y, radius);_NEWLINE_   }}/** "Abstraction" */abstract class Shape {_NEWLINE_   protected DrawingAPI drawingAPI;_NEWLINE__NEWLINE_   protected Shape(DrawingAPI drawingAPI){_NEWLINE_      this.drawingAPI = drawingAPI;_NEWLINE_   }_NEWLINE__NEWLINE_   public abstract void draw();                             // low-level_NEWLINE_   public abstract void resizeByPercentage(double pct);     // high-level}/** "Refined Abstraction" */class CircleShape extends Shape {_NEWLINE_   private double x, y, radius;_NEWLINE_   public CircleShape(double x, double y, double radius, DrawingAPI drawingAPI) {_NEWLINE_      super(drawingAPI);_NEWLINE_      this.x = x;  this.y = y;  this.radius = radius;_NEWLINE_   }_NEWLINE__NEWLINE_   // low-level i.e. Implementation specific_NEWLINE_   public void draw() {_NEWLINE_        drawingAPI.drawCircle(x, y, radius);_NEWLINE_   }_NEWLINE_   // high-level i.e. Abstraction specific_NEWLINE_   public void resizeByPercentage(double pct) {_NEWLINE_        radius *= pct;_NEWLINE_   }}/** "Client" */class BridgePattern {_NEWLINE_   public static void main(String[] args) {_NEWLINE_       Shape[] shapes = new Shape[] {_NEWLINE_           new CircleShape(1, 2, 3, new DrawingAPI1()),_NEWLINE_           new CircleShape(5, 7, 11, new DrawingAPI2()),_NEWLINE_       };_NEWLINE__NEWLINE_       for (Shape shape : shapes) {_NEWLINE_           shape.resizeByPercentage(2.5);_NEWLINE_           shape.draw();_NEWLINE_       }_NEWLINE_   }}'