Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Stock goog = new Stock("GOOG");

            goog.SetPrice(100.0);

            Investor Juan  = new Investor(nameof(Juan));
            Investor Maria = new Investor(nameof(Maria));

            goog.Add(Juan);
            goog.Add(Maria);

            goog.SetPrice(100.0);
            goog.SetPrice(101.0);
            goog.SetPrice(101.5);
            goog.SetPrice(90.0);
            goog.SetPrice(89.9);
        }
Exemplo n.º 2
0
 public void Remove(Investor investor)
 {
     this.investors.Remove(investor);
 }
Exemplo n.º 3
0
 public void Add(Investor investor)
 {
     this.investors.Add(investor);
 }