Usage: ○ In the Program class, you create instances of Circle with different drawing?
PIs (DrawingAPI1 and DrawingAPI2). The client code can easily switch
between different rendering styles without changing the shape itself.
class Program
{
static void Main()
{
Shape circle1 = new Circle(5, 10, 2, new DrawingAPI1());
Shape circle2 = new Circle(5, 10, 2, new DrawingAPI2());
circle1.Draw(); // Outputs: Drawing Circle at (5, 10) with
radius 2 using API 1.
circle2.Draw(); // Outputs: Drawing Circle at (5, 10) with
radius 2 using API 2.
}
}