public static void Stock() { var stockChecker = new StockChecker(); var stockLevelChecker = new StockLevelChecker(); var stockAlert = new StockAlert(); stockChecker.CheckStockLevel(); stockLevelChecker.StockLevel(stockChecker); stockAlert.ShowStockAlerts(stockChecker); }
public bool StockLow(StockChecker s) { return(s.StockLevel > 5); }
public void ShowStockAlert(StockChecker s) { Console.WriteLine("Stock level is {0}", s.StockLevel); }
public void ShowStockAlerts(StockChecker stockChecker) { Console.WriteLine("Stock is Low", stockChecker.StockLevel); }