public string DispenseAmount(int amount) { DispenseFactory dispFactory = new DispenseFactory(); dispFactory.DistributeMoney(amount); return(ReturnAmount == 0 ? "Thank you please visit again" : "please enter proper input"); }
public FiveHundred(int amount) { ReturnAmount = CalculateLogic(amount, 500); if (ReturnAmount > 0) { DispenseFactory dispenseFactory = new DispenseFactory(); dispenseFactory.DistributeMoney(ReturnAmount); } }
public Thousand(int amount) { ReturnAmount = CalculateLogic(amount, 1000); if (ReturnAmount > 0) { DispenseFactory dispenseFactory = new DispenseFactory(); dispenseFactory.DistributeMoney(ReturnAmount); } }