public static void Main()
        {
            var compound = new InterestCalculator(800.0m, 3.2m, 5, GetCompoundInterest);
            Console.WriteLine(compound);

            var simple = new InterestCalculator(1000.0m, 3.2m, 10, GetSimpleInterest);
            Console.WriteLine(simple);
        }
Пример #2
0
        static void Main(string[] args)
        {
            var compaundResult = new InterestCalculator(500m, 0.056m, 10, GetCompoundInterest);

            var simpleResult = new InterestCalculator(2500m, 0.072m, 15, GetSimpleInterest);

            Console.WriteLine(compaundResult.Balance);
            Console.WriteLine(simpleResult.Balance);
        }
        static void Main(string[] args)
        {
            var compaundResult = new InterestCalculator(500m, 0.056m, 10, GetCompoundInterest);

            var simpleResult = new InterestCalculator(2500m, 0.072m, 15, GetSimpleInterest);

            Console.WriteLine(compaundResult.Balance);
            Console.WriteLine(simpleResult.Balance);
        }
Пример #4
0
        static void Main(string[] args)
        {
            var calculator = new InterestCalculator(2500, 7.2, 15, GetSimpleInterest);

            Console.WriteLine(calculator);

            var calculator1 = new InterestCalculator(500, 5.6, 10, GetCompoundInterest);

            Console.WriteLine(calculator1);
        }
Пример #5
0
            private static void Main(string[] args)
            {
                Func <decimal, decimal, int, decimal> simple   = GetSimpleInterest;
                Func <decimal, decimal, int, decimal> compound = GetCompoundInterest;

                var acc1 = new InterestCalculator(500m, 5.6m, 10, compound);
                var acc2 = new InterestCalculator(2500m, 7.2m, 15, simple);

                Console.WriteLine(acc1);
                Console.WriteLine(acc2);
            }