예제 #1
0
 public Rare(double currentTemp, Steak steak)
 {
     this.currentTemp = currentTemp;
     this.steak       = steak;
     canEat           = true; //We can now eat the steak
     Initialize();
 }
예제 #2
0
        static void Main(string[] args)
        {
            //Let's cook a steak!
            Steak steak = new Steak("T-Bone");

            // Apply temperature changes
            steak.AddTemp(120);
            steak.AddTemp(15);
            steak.AddTemp(15);
            steak.RemoveTemp(10); //Yes I know cooking doesn't work this way, bear with me.
            steak.RemoveTemp(15);
            steak.AddTemp(20);
            steak.AddTemp(20);
            steak.AddTemp(20);

            Console.ReadKey();
        }