```
#include <iostream>
class RectangleInterface
{
public:
virtual void draw() = 0;
};
class Rectangle
{
public:
Rectangle(int x1, int y1, int x2, int y2):x1_(x1), y1_(y1), x2_(x2), y2_(y2) {}
void oldDraw() {
std::cout << "Rectangle: oldDraw(). \n";
}
private:
int x1_, y1_, x2_, y2_;
};
// Adapter wrapper
class RectangleAdapter: public RectangleInterface, private Rectangle
{
public:
RectangleAdapter(int x, int y, int w, int h):
Rectangle(x, y, x + w, y + h) { }
void draw() {
std::cout << "RectangleAdapter: draw().\n";
oldDraw();
}
};
int main()
{
int x = 20, y = 50, w = 300, h = 200;
RectangleInterface *r = new RectangleAdapter(x,y,w,h);
r->draw();
}
/*
RectangleAdapter: draw().
Rectangle: oldDraw().
*/
```