public VendingMachine(Item[,] items) { _shelve = items; _displayScreen = new Display(); _transactor = new Transactor(); _keypad = new KeyPad(); _userAmount = 0; }
private int userAmount; // Field to keep track of the user's money // Parameterized constructor public VendingMachine(Item[,] items) { this._shelve = items; this._machineDisplay = new Display(); this._machineTransactor = new Transactor(); this._machineKeypad = new KeyPad(); this.userAmount = 0; }