Exemple #1
0
        public static void Run()
        {
            var chocolateBoiler = ChocolateBoiler.GetInstance();

            chocolateBoiler.Fill();
            chocolateBoiler.Boil();
            chocolateBoiler.Drain();
        }
Exemple #2
0
        public static ChocolateBoiler GetInstance()
        {
            if (_chocolateBoiler is null)
            {
                _chocolateBoiler = new ChocolateBoiler();
            }

            return(_chocolateBoiler);
        }