Exemplo n.º 1
0
        public void Main()
        {
            IAccount account = new RegularSavingAccount();

            account.Balance = 500;
            Console.WriteLine(account.CalcInterest());

            account         = new SalarySavingAccount();
            account.Balance = 5000;
            Console.WriteLine(account.CalcInterest());

            account         = new CorporateAccount();
            account.Balance = 5000;
            Console.WriteLine(account.CalcInterest());
        }