示例#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());
        }
示例#3
0
        public int GetTotalCash()
        {
            IMonitorService ATM = new RealATM();

            return(ATM.GetTotalCash());
        }
示例#4
0
        public string GetStatus()
        {
            IMonitorService ATM = new RealATM(); //

            return(ATM.GetStatus());
        }