Beispiel #1
0
        static void Main(string[] args)
        {
            Lampe salon = new Lampe("Salon", "eteint");

            Lampe cuisine = new Lampe("Cuisine", "eteint");

            Interrupteur intersalon = new Interrupteur(salon);

            intersalon.on();
            //intersalon.off();

            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Lampe salon = new Lampe();

            Lampe cuisine = new Lampe("allumé");

            Interrupteur intersalon = new Interrupteur(salon);

            intersalon.on();
            intersalon.off();

            Console.ReadLine();
        }
Beispiel #3
0
 public Interrupteur(Lampe MaLampe)
 {
     this.MaLampe = MaLampe;
     OnOff        = "off";
     Console.WriteLine("Creation inter: etat : " + this.OnOff);
 }