Example #1
0
        public static void Main()

        {
            Debt mortgage = new Debt(120000.0, 1.01);


            mortgage.PrintBalance();

            mortgage.WaitOneYear();

            mortgage.PrintBalance();

            int years = 0;

            while (years < 20)

            {
                years += 1;

                mortgage.WaitOneYear();
            }

            mortgage.PrintBalance();
            Console.ReadLine();
        }
Example #2
0
        public static void Main(string[] args)
        {
            Debt mortgage = new Debt(120000.0, 1.01);

            mortgage.PrintBalance();
            mortgage.WaitOneYear();

            int year = 0;

            while (year < 20)
            {
                mortgage.WaitOneYear();
                year = year + 1;
            }
            mortgage.PrintBalance();
        }
Example #3
0
        public static void Main(string[] args)
        {
            Debt mortgage = new Debt(120000.0, 1.01);

            mortgage.PrintBalance();

            mortgage.WaitOneYear();
            mortgage.PrintBalance();

            // Wait 20 years
            int years = 0;

            while (years < 20)
            {
                mortgage.WaitOneYear();
                years = years + 1;
            }

            mortgage.PrintBalance();
            Console.ReadKey();
        }