Example #1
0
 public static void Main()
 {
     IndividualCustomer me = new IndividualCustomer("Vanya Karaasenova", "12555555");
     DepositAccount myDepositAccount = new DepositAccount(me);
     Console.WriteLine("My deposit account interest rate: {0}", myDepositAccount.InterestRate);
     myDepositAccount.DepositMoney(50000);
     Console.WriteLine("My deposit account balance: {0}", myDepositAccount.Balance);
     decimal result = myDepositAccount.CalculateMonthlyInterest();
     Console.WriteLine("My deposit account monthly interest: {0}", result);
 }
Example #2
0
        static void Main()
        {
            CompanyCustomer aries         = new CompanyCustomer("Aries", "Sofia");
            List <Account>  ariesAccounts = new List <Account>()
            {
                new DepositAccount(aries, 15000, 0.3M),
                new LoanAccount(aries, 12000, 0.01M),
                new MortgageAccount(aries, 10000, 0.02M)
            };

            ariesAccounts[0].Deposit(1000);
            Console.WriteLine("Ballance of the Aries' deposit account: {0}", ariesAccounts[0].Balance);
            Console.WriteLine("Ballance of the Aries' accounts:\r\nDeposit: {0}\r\nLoan: {1}\r\nMortgage: {0}", ariesAccounts[0].Balance, ariesAccounts[1].Balance, ariesAccounts[2].Balance);

            Console.WriteLine();

            IndividualCustomer gosho        = new IndividualCustomer("Georgi", "Georgiev", "Varna");
            DepositAccount     goshoDeposit = new DepositAccount(gosho, 2000, 0.03M);

            goshoDeposit.Draw(500);
            Console.WriteLine("Ballance of Georgi Georgiev's deposit account: {0}", goshoDeposit.Balance);
            Console.WriteLine("The interest of Georgi Georgiev's deposit account for the first 3 months: {0}", goshoDeposit.CalculateInterestAmount(3));
        }
Example #3
0
        static void Main()
        {
            CompanyCustomer aries = new CompanyCustomer("Aries", "Sofia");
            List<Account> ariesAccounts = new List<Account>()
            {
                new DepositAccount(aries, 15000, 0.3M),
                new LoanAccount (aries, 12000, 0.01M),
                new MortgageAccount (aries, 10000, 0.02M)
            };

            ariesAccounts[0].Deposit(1000);
            Console.WriteLine("Ballance of the Aries' deposit account: {0}", ariesAccounts[0].Balance);
            Console.WriteLine("Ballance of the Aries' accounts:\r\nDeposit: {0}\r\nLoan: {1}\r\nMortgage: {0}", ariesAccounts[0].Balance, ariesAccounts[1].Balance, ariesAccounts[2].Balance);

            Console.WriteLine();

            IndividualCustomer gosho = new IndividualCustomer("Georgi", "Georgiev", "Varna");
            DepositAccount goshoDeposit = new DepositAccount(gosho, 2000, 0.03M);

            goshoDeposit.Draw(500);
            Console.WriteLine("Ballance of Georgi Georgiev's deposit account: {0}", goshoDeposit.Balance);
            Console.WriteLine("The interest of Georgi Georgiev's deposit account for the first 3 months: {0}", goshoDeposit.CalculateInterestAmount(3));
        }