public static void BuyProduct(int keyPush, int latestKeyPush) { if (ProductStock.CheckSupply(keyPush)) { Vending.DetailTheExchange(keyPush, latestKeyPush); } else { ConcatenateCurrentMessage($"We have run out of {ProductStock.ShowProductInfo(keyPush).ProductName}"); } }
public static void ReceiveAmount(int moneyInserted) { Vending.IncreaseDebtToCustomer(moneyInserted); switch (moneyInserted) { case 1: moneyAvailable[7]++; break; case 5: moneyAvailable[6]++; break; case 10: moneyAvailable[5]++; break; case 20: moneyAvailable[4]++; break; case 50: moneyAvailable[3]++; break; case 100: moneyAvailable[2]++; break; case 500: moneyAvailable[1]++; break; case 1000: moneyAvailable[0]++; break; default: break; } }
public static void EndSession() { Vending.SettleDebtToCustomer(); Display.PowerDownDisplay(); activityState = "energy save mode"; }
public static void ReleaseFullAmount(int[] coinReturn, int[] banknoteReturn) //This represents the physical action { Vending.BalanceDebtByMoneyBack(); amountToReturn = 0; }
public static void DisplayCurrentMessage() { Console.WriteLine("Welcome"); Console.WriteLine("You have {0} kr", Vending.RevealDebtToCustomer()); Console.WriteLine(currentMessage); }