示例#1
0
        public static void Main()
        {
            InterestCalculator compoundInterest = new InterestCalculator(500, 5.6, 10, GetCompoundInterest);
            Console.WriteLine(compoundInterest);

            InterestCalculator simpleInterest = new InterestCalculator(2500, 7.2, 15, GetSimpleInterest);
            Console.WriteLine(simpleInterest);
        }
        static void Main()
        {
            InterestCalculator compoundInterest = new InterestCalculator(500m, 0.056m, 10, GetCompoundInterest);
            Console.WriteLine(compoundInterest.AccruedInterest);

            InterestCalculator simpleInterest = new InterestCalculator(2500m, 0.072m, 15, GetSimpleInterest);
            Console.WriteLine(simpleInterest.AccruedInterest);
        }
        static void Main(string[] args)
        {
            var simpleInterest = new InterestCalculator(500m, 5.6m, 10, GetCompoundInterest);

            Console.WriteLine(simpleInterest);
            var compoundInterest = new InterestCalculator(2500m, 7.2m, 15, GetSimpleInterest);

            Console.WriteLine(compoundInterest);
        }
示例#4
0
        static void Main(string[] args)
        {
            InterestCalculator compound = new InterestCalculator(500, 5.6, 10, GetCompoundInterest);

            Console.WriteLine(compound);
            InterestCalculator simple = new InterestCalculator(2500, 7.2, 15, GetSimpleInterest);

            Console.WriteLine(simple);
        }
示例#5
0
        static void Main()
        {
            InterestCalculator compoundInterest = new InterestCalculator(500m, 0.056m, 10, GetCompoundInterest);

            Console.WriteLine(compoundInterest.AccruedInterest);

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

            Console.WriteLine(simpleInterest.AccruedInterest);
        }
示例#6
0
        static void Main()
        {
            InterestCalculator compoundInterest = new InterestCalculator(500, 5.6, 10, GetCompoundInterest);

            Console.WriteLine(compoundInterest.ToString());

            InterestCalculator simpleInterest = new InterestCalculator(2500, 7.2, 15, GetSimpleInterest);

            Console.WriteLine(simpleInterest.ToString());
        }
示例#7
0
文件: Test.cs 项目: KStoilkov/SoftUni
        public static void Main()
        {
            CalculateInterest simple   = GetSimpleInterest;
            CalculateInterest compound = GetCompundInterest;

            InterestCalculator calc  = new InterestCalculator(500, 5.6, 10, compound);
            InterestCalculator calc2 = new InterestCalculator(2500, 7.2, 15, simple);

            Console.WriteLine(calc.CalculatedInterest);
            Console.WriteLine(calc2.CalculatedInterest);
        }
示例#8
0
        public static void Main()
        {

            CalculateInterest simple = GetSimpleInterest;
            CalculateInterest compound = GetCompundInterest;

            InterestCalculator calc = new InterestCalculator(500, 5.6, 10, compound);
            InterestCalculator calc2 = new InterestCalculator(2500, 7.2, 15, simple);

            Console.WriteLine(calc.CalculatedInterest);
            Console.WriteLine(calc2.CalculatedInterest);
        }