private static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            var individ = new Individual("a");
            var company = new Company("company");
            var mortgage1 = new Mortgage(individ,4,5);
            var mortgage2 = new Mortgage(company,4,5);
            var loan = new Loan(company,3123000,3.2m);

            Console.WriteLine(mortgage1.CalculateInterest(7));
            Console.WriteLine(mortgage2.CalculateInterest(7));
            Console.WriteLine(loan.CalculateInterest(8));
        }
示例#2
0
        static void Main(string[] args)
        {
            Bank bank = new Bank("WBank");


            Customer newOwner  = new Customer("Vio", CustomerType.Individual);
            Deposit  myDeposit = new Deposit(newOwner, 1200, 3.45d);

            bank.AddAccount(myDeposit);
            bank.Display();
            Customer secondOwner = new Customer("SRL", CustomerType.Company);
            Mortgage SRL         = new Mortgage(secondOwner, 500, 5.50d);

            bank.AddAccount(SRL);
            bank.Display();
            //bank.InfoBank();
        }