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); }
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); }
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() { 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()); }
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); }
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); }