Beispiel #1
0
        static void Main( )
        {
            const double RENTAL_AMOUNT = 1000.00;

            RealEstateInvestment invest1 = new
                                           RealEstateInvestment(2004, 150000,
                                                                "65th Street");

            WriteLine("\tFirst Investment");
            invest1.MonthlyExpense = GetExpenses();
            invest1.IncomeFromRent = RENTAL_AMOUNT;
            WriteLine();
            WriteLine("Property Location: {0}",
                      invest1.StreetAddress);
            WriteLine("Earnings For Month: {0:C}",
                      invest1.DetermineMonthlyEarnings());

            RealEstateInvestment invest2 = new
                                           RealEstateInvestment("72 Westchester Dr.", 229000);

            invest2.MonthlyExpense = 900;
            invest2.IncomeFromRent = 1500.00;
            WriteLine("\n\n\tSecond Investment");
            WriteLine(invest2);
            ReadKey();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            const double RENTAL_AMOUNT = 1000.00;

			RealEstateInvestment invest1 = new 
				RealEstateInvestment(2004,150000,
									"65th Street");
            Console.WriteLine("\tFirst Investment");
            invest1.MonthlyExpense = GetExpenses( );
			invest1.IncomeFromRent = RENTAL_AMOUNT;
			Console.WriteLine( );
			Console.WriteLine("Property Location: {0}", 
								invest1.StreetAddress);
			Console.WriteLine("Earnings For Month: {0:C}",
						invest1.DetermineMonthlyEarnings( ));

            RealEstateInvestment invest2 = new
                RealEstateInvestment("72 Westchester Dr.", 229000);
        
            invest2.MonthlyExpense = 900;
            invest2.IncomeFromRent = 1500.00;
            Console.WriteLine("\n\n\tSecond Investment");
            Console.WriteLine(invest2);
            Console.ReadKey();
		}