public VendingMachine() { string filePath; string currentDirectory = Directory.GetCurrentDirectory(); filePath = Path.Combine(currentDirectory, "vendingmachineinventory.txt"); InventoryFileDAL newMachine = new InventoryFileDAL(filePath); this.inventory = newMachine.GetInventory(); }
public VendingMachine() { InventoryFileDAL fileReader = new InventoryFileDAL(); this.inventory = fileReader.GetInventory(); }
/// <summary> /// Constructor for new vending machine. Inventory is automatically stocked when creating the machine. /// </summary> public VendingMachine() { inventory = inventorySource.GetInventory(); }