Пример #1
0
        static void Main(string[] args)
        {
            Garland garland1 = new ColoredLamp();

            garland1.CurrentState();

            Garland garland2 = new OrdinaryLamp();

            garland2.CurrentState();
        }
Пример #2
0
        public override void CurrentState()
        {
            Console.WriteLine("How many lamps in the colored garland");
            Garland colorednumber = new ColoredLamp();

            ColoredCount = colorednumber.CheckNumber();
            Console.WriteLine("Count of lamps is" + ColoredCount);



            List <ColoredLamp> ColoredLampList = new List <ColoredLamp> // Populate List


            {
                new ColoredLamp {
                    ID = 1, Color = "a", State = "a"
                }
            };
        }