static void Main(string[] args) { var c = new Lampada(new Ligada()); c.Liga(); c.Desliga(); c.Desliga(); c.Liga(); c.Desliga(); Console.Read(); }
public void Handle(Lampada lampada) { lampada.Estado = new Ligada(); }