Exemple #1
0
        public static void Main(string[] args)
        {
            AbstarctPencil objPencil = null; AbstractShape objShape = null;

            objShape = new Circle(); objPencil = new RedPencil(objShape);
            objPencil.DrawWithColor();
        }
Exemple #2
0
 public RedPencil(AbstractShape objShape) : base(objShape)
 {
 }
Exemple #3
0
 public BluePencil(AbstractShape objShape) : base(objShape)
 {
 }
Exemple #4
0
 public AbstarctPencil(AbstractShape objShape)
 {
     this.objShape = objShape;
 }