コード例 #1
0
        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();
        }
コード例 #2
0
 public Stock(CurrencyInfo currencyInfo)
 {
     _currencyInfo = currencyInfo;
 }