static void Main(string[] args) { CurrencyInfo currencyInfo = new CurrencyInfo(); Stock stock = new Stock(currencyInfo); Broker broker = new Broker(stock); Bank bank = new Bank(stock); stock.ChangeRate(); broker.StopTrade(); stock.ChangeRate(); bank.StopTrade(); stock.ChangeRate(); }
public Stock(CurrencyInfo currencyInfo) { _currencyInfo = currencyInfo; }