Example #1
0
        public static void Test()
        {
            Shape theShape = new Rectangle();
            Color white = new White();
            Color red = new Red();

            theShape.Color = white;
            theShape.Draw();

            theShape.Color = red;
            theShape.Draw();
        }
Example #2
0
        public static void Test()
        {
            Shape theShape = new Rectangle();
            Color white    = new White();
            Color red      = new Red();

            theShape.Color = white;
            theShape.Draw();

            theShape.Color = red;
            theShape.Draw();
        }