示例#1
0
        static void Main(string[] args)
        {
            RealATM atm = new RealATM();

            GetProxy(new ATMProxy());

            atm.InsertCard();
            atm.EjectCard();
            atm.Desposit(1000);
            atm.Withdraw(20000);
        }
示例#2
0
        static void Main(string[] args)
        {
            RealATM atm = new RealATM();

            GetProxy(new ATMProxy());
            Console.WriteLine();

            atm.InsertCard();
            atm.EjectCard();
            Console.WriteLine("Current amount of money: ");
            Console.WriteLine(atm.GetTotalCash());
            Console.WriteLine("Despositing 1000. Current amount of money: ");
            atm.Desposit(1000);
            Console.WriteLine(atm.GetTotalCash());
            Console.WriteLine("Withdrawing 20000. Current amount of money: ");
            atm.Withdraw(20000);
            Console.WriteLine(atm.GetTotalCash());
        }