static void Main(string[] args)
        {
            ITempSensor tempsensor = new TempSensor();
            IHeater     heater     = new Heater();
            IWindow     window     = new Window();
            var         ecs        = new ECS(28, 40, tempsensor, heater, window);

            ecs.Regulate();

            ecs.SetThreshold(20);

            ecs.Regulate();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            ITempSensor tempSensor = new TempSensor();
            IHeater     heater     = new Heater();
            //Tester
            var ecs = new ECS(28, tempSensor, heater);

            ecs.Regulate();

            ecs.SetThreshold(20);

            ecs.Regulate();

            ecs.SetThreshold(26);

            ecs.Regulate();

            //Hej Ditte
        }