Esempio n. 1
0
        static void Main(string[] args)
        {
            ChocolateBoiler boiler1 = ChocolateBoiler.GetInstance();
            ChocolateBoiler boiler2 = ChocolateBoiler.GetInstance();

            boiler1.Fill();
            boiler2.Boil();
            boiler1.Drain();

            Console.Read();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ChocolateBoiler chocolateBoiler = ChocolateBoiler.GetInstance();

            chocolateBoiler.Fill();
            ChocolateBoiler anotherChocolateBoiler = ChocolateBoiler.GetInstance();

            anotherChocolateBoiler.Drain();
            chocolateBoiler.Boil();
            chocolateBoiler.Drain();
            Console.ReadKey();
        }