Example #1
0
        static void Main(string[] args)
        {
            IBM ibm = new IBM("IBM", 120.0);

            ibm.Attach(new Investor("Sorros"));
            ibm.Attach(new Investor("Berkshire"));

            // Change price, which notifies investors
            ibm.Price = 120.10;
            ibm.Price = 121.00;
            ibm.Price = 120.50;
            ibm.Price = 120.75;
            // Wait for user
            Console.Read();
        }
Example #2
0
        static void Main(string[] args)
        {

            IBM ibm = new IBM("IBM", 120.0);
            ibm.Attach(new Investor("Sorros"));
            ibm.Attach(new Investor("Berkshire"));

            // Change price, which notifies investors
            ibm.Price = 120.10;
            ibm.Price = 121.00;
            ibm.Price = 120.50;
            ibm.Price = 120.75;
            // Wait for user
            Console.Read();
        }