// 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);
        }
        // constructor
        public VendingMachine(decimal balance)
        {
            // start in the idle state with no money inserted
            CurrentState = new IdleVendingMachineState(this);

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