Пример #1
0

        
Пример #2
0
        // constructor
        public VendingMachine(decimal balance)
        {
            // pass initial balance for vending machine
            MachineBalance = balance;

            // start in the idle state with no money inserted
            CurrentState = new IdleVendingMachineState(this);
        }
Пример #3
0
        // constructor
        public VendingMachine(decimal balance)
        {
            // start in the idle state with no money inserted
            CurrentState = new IdleVendingMachineState(this);

            //Initial balance
            vmBalance = balance;
        }
Пример #4
0
 // constructor
 public VendingMachine()
 {
     // start in the idle state with no money inserted
     CurrentState = new IdleVendingMachineState(this);
 }