Пример #1
0
        static void Main(string[] args)
        {
            //4
            StockManager stockManager = new StockManager();
            BuyStock     buyStock     = new BuyStock(stockManager);
            SellStock    sellStock    = new SellStock(stockManager);

            StockController stockController = new StockController();

            stockController.TakeOrder(buyStock);
            stockController.TakeOrder(sellStock);
            stockController.TakeOrder(buyStock);

            stockController.PlaceOrders();
            Console.ReadLine();
            //
        }
Пример #2
0
 public SellStock(StockManager stockManager)
 {
     _stockManager = stockManager;
 }
Пример #3
0
 public BuyStock(StockManager stockManager)
 {
     _stockManager = stockManager;
 }