Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MicrowaveOven microwaveOven = new MicrowaveOven();

            TimeSpan duration = TimeSpan.FromMinutes(10);

            microwaveOven.Start(duration);

            microwaveOven.OpenDoor();

            microwaveOven.Stop();

            microwaveOven.OpenDoor();

            Console.ReadLine();
        }
Exemplo n.º 2
0
 public NotHeatingState(MicrowaveOven oven)
 {
     Context = oven;
 }