public static void Stock()
        {
            var stockChecker      = new StockChecker();
            var stockLevelChecker = new StockLevelChecker();
            var stockAlert        = new StockAlert();

            stockChecker.CheckStockLevel();
            stockLevelChecker.StockLevel(stockChecker);
            stockAlert.ShowStockAlerts(stockChecker);
        }
Example #2
0
 public bool StockLow(StockChecker s)
 {
     return(s.StockLevel > 5);
 }
Example #3
0
 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);
 }