Пример #1
0
        private void Start()
        {
            ATMMachine machine = new ATMMachine(2000);

            machine.InsertCard();
            machine.RejectCard();

            machine.InsertCard();
            machine.EnterPincode(1234);
            machine.WithdrawCash(1500);

            machine.InsertCard();
            machine.EnterPincode(1234);
            machine.WithdrawCash(750);
        }
Пример #2
0
        void start()
        {
            ATMMachine machine = new ATMMachine(2000);

            machine.insertCard();
            machine.rejectCard();

            machine.insertCard();
            machine.enterPincode(1234);
            machine.withdrawCash(1500);

            machine.insertCard();
            machine.enterPincode(1234);
            machine.withdrawCash(750);

            Console.ReadKey();
        }
Пример #3
0
 public CardPresentState(ATMMachine machine)
 {
     this.machine = machine;
 }
Пример #4
0
 public NoCashState(ATMMachine machine)
 {
     this.machine = machine;
 }
Пример #5
0
 public CorrectPinState(ATMMachine machine)
 {
     this.machine = machine;
 }