Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var atm     = new ATMSubject();
            var display = new Display();
            var bank    = new Bank();

            atm.RegisterObserver(bank);
            atm.RegisterObserver(display);
            atm.BankTransfer("aaa", "bbb", 50);
            Console.ReadLine();
        }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     var atm = new ATMSubject();
     var display = new Display();
     var bank = new Bank();
     atm.RegisterObserver(bank);
     atm.RegisterObserver(display);
     atm.BankTransfer("aaa","bbb",50);
     Console.ReadLine();
 }