Exemplo n.º 1
0
 public void HeatUp(Water water)
 {
     Console.WriteLine("Warm the ice");
     water.State = new LiquidWaterState();
 }
 public void HeatUp(Water water)
 {
     Console.WriteLine("turn liquid into steam");
     water.State = new GasWaterState();
 }
Exemplo n.º 3
0
 public void Chilled(Water water)
 {
     Console.WriteLine("Froze the ice");
 }
 public void Chilled(Water water)
 {
     Console.WriteLine("turn liquid into ice");
     water.State = new SolidWaterState();
 }