Ejemplo n.º 1
0
Archivo: Program.cs Proyecto: ribex/OOP
 public Portfolio(double cash, double stocks, double bonds, double mutualFunds)
 {
     this.cash        = new Cash(cash);
     this.stocks      = new Stocks(stocks);
     this.bonds       = new Bonds(bonds);
     this.mutualFunds = new MutualFunds(mutualFunds);
 }
Ejemplo n.º 2
0
Archivo: Program.cs Proyecto: ribex/OOP
        static void Main(string[] args)
        {
            var myCash        = new Cash(121.36);
            var myStocks      = new Stocks(2342.87);
            var myBonds       = new Bonds(3212.03);
            var myMutualFunds = new MutualFunds(4321.45);
            var myPortfolio   = new Portfolio();

            Console.WriteLine("Total Portfolio Balance: " + myPortfolio.TotalBalance(myCash.CashBalance, myStocks.StocksBalance, myBonds.BondsBalance, myMutualFunds.MutualFundsBalance));
        }