Exemple #1
0
        public static void Main(string[] args)
        {
            var TempSensor = new TempSensor();
            var ecs        = new ECS(20, TempSensor, new Heater());



            TempSensor.setTemp(19);
            ecs.Regulate();
            TempSensor.setTemp(25);
            Console.ReadLine();
            //ecs.Handle;

            // ecs.Regulate();
        }
Exemple #2
0
 public ECS(int thr)
 {
     SetThreshold(thr);
     _tempSensor = new TempSensor();
     _heater     = new Heater();
 }