Beispiel #1
0
        public static void Display()
        {
            Account acc = new MicroAccount();

            try
            {
                CalculateInterest(acc); // получаем 1100 без бонуса 100
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Beispiel #2
0
        public static void Display()
        {
            Account acc = new MicroAccount();

            try
            {
                InitializeAccount(acc);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Beispiel #3
0
 public static void Display()
 {
     try
     {
         Account acc = new Account(1000);
         acc.Capital = 10;
         acc         = new MicroAccount(1000);
         acc.Capital = 10;
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }