public InterestCalculator(double money, double interest, int years, CalculateInterest calculationMethod) { this.Money = money; this.Interest = interest; this.Years = years; this.calculationMethod = calculationMethod; }
public InterestCalculator(double money, double interest, int years, CalculateInterest interestCalcDelegate) { this.Money = money; this.Interest = interest; this.Years = years; this.interestCalcDelegate = interestCalcDelegate; }
public InterestCalculator(decimal money, decimal interes, int years, CalculateInterest type) { this.years = years; this.type = type; this.interes = interes; this.money = money; }
public InterestCalculator(decimal sum, double interest, int years, CalculateInterest calculationType) { this.Sum = sum; this.Interest = interest; this.Years = years; this.calculationType = calculationType; }
public InterestCalculator(decimal moneyBalance, decimal interestRate, int years, CalculateInterest calculationMethod) { this.Balance = moneyBalance; this.InterestRate = interestRate; this.Years = years; this.calculationMethod = calculationMethod; }
public InterestCalculator(decimal balance, decimal interest, byte years, CalculateInterest interestMethod) { this.Balance = balance; this.Interest = interest; this.Years = years; this.InterestMethod = interestMethod; }
public InterestCalculator(decimal sum, decimal interest, int years, CalculateInterest calc) { this.sum = sum; this.interest = interest; this.years = years; this.calc = calc; }
public InterestCalculator(decimal amount, decimal interest, int years, CalculateInterest simpleOrCompound) { this.Amount = amount; this.Interest = interest; this.Years = years; this.Result = simpleOrCompound(amount, interest, years); }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest myDelegate) { this.Money = money; this.Interest = interest; this.Years = years; this.myDelegate = myDelegate; }
public InterestCalculator(decimal money, decimal interest, int year, CalculateInterest calculateInterest) { this.MoneyOfMoney = money; this.Interest = interest; this.Year = year; this.calculateInterest = calculateInterest; }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest val) { this.money = money; this.interest = interest; this.years = years; this.paybackValue = val(money, interest, years); }
public InterestCalculator(int money, decimal interest, int years, CalculateInterest calculate) { this.Money = money; this.Interest = interest; this.Years = years; this.Calculate = calculate; }
public InterestCalculator(double money, double interest, int years, CalculateInterest del) { this.Money = money; this.Interest = interest; this.Years = years; this.CalculatedInterest = del(money, interest, years); }
public InterestCalculator(double sum, double interest, int years, CalculateInterest calculationMethod) { this.Sum = sum; this.Interest = interest; this.Years = years; this.CalculateInterest = calculationMethod(sum,interest,years); }
public InterestRateCalculator(decimal sum, double interest, int years, CalculateInterest interestDelegate) { this.Sum = sum; this.Interest = interest; this.Years = years; this.interestDelegate = interestDelegate; }
public InterestCalculator(double s, double i, int y, CalculateInterest type) { this.sum = s; this.interest = i; this.years = y; this.ci = type; }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest type) { this.Money = money; this.Interest = interest; this.Years = years; this.result = type(money, interest, years); }
public InterestCalculator(decimal money, double interestRate, int years, CalculateInterest calculateInterest) { this.Money = money; this.Years = years; this.InterestRate = interestRate; this.CalculateInterest = calculateInterest; }
public InterestCalculator(decimal money, decimal interestRate, int years, CalculateInterest interestCalculationDelegate) { this.Money = money; this.InterestRate = interestRate; this.Years = years; this.InterestCalculationDelegate = interestCalculationDelegate; }
public InterestCalculator(decimal amount, double interest, int years, CalculateInterest calculateInterest) { this.Amount = amount; this.Interest = interest; this.Years = years; this.CalculateInterest = calculateInterest; }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest type) { this.Money = money; this.Interest = interest; this.Years = years; this.ResultValue = type(money, interest, years); }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest calcInterest) { this.Money = money; this.Interest = interest; this.Years = years; this.TotalMoney = calcInterest(money, interest, years); }
public InterestCalculator(double sum, double interest, int years, CalculateInterest calcInterest) { this.interest = interest/100; this.sum = sum; this.years = years; this.calcIterest = calcInterest; }
//constructor with delegate public InterestCalculator(decimal sum, decimal interest, int years, CalculateInterest calcMethod) { this.Sum = sum; this.Interest = interest; this.Years = years; this.earnedInterest = calcMethod(this.sum, this.interest, this.years); }
public InterestCalculator(decimal sum, double interest, int years, CalculateInterest type) { this.sum = sum; this.interest = interest; this.years = years; this.type = type; }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest type) { this.Money = money; this.Interest = interest; this.Years = years; this.Type = type; }
public InterestCalculator(decimal sumMoney, double interest, int years, CalculateInterest d) { this.SumMoney = sumMoney; this.Interest = interest; this.Years = years; this.DelegateValue = d(sumMoney, interest, years); }
// Main Constructor public InterestCalculator(decimal sum, decimal interest, int years, CalculateInterest type) { this.Sum = sum; this.Interest = interest; this.Years = years; this.type = type; }
public InterestCalculator(double money, double interest, int years, CalculateInterest CalculateInterest) { this.Money = money; this.Interest = interest / 100; this.Years = years; this.InterestResult = CalculateInterest(this.Money, this.Interest, this.Years); }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest calcInterest) { this.Money = money; this.Years = years; this.Interest = interest; this.paybackValue = calcInterest(this.Money, this.Interest, this.Years); }
public InterestCalculator(double sum, double interest, int years, CalculateInterest del) { this.sumOfMoney = sum; this.interest = interest; this.years = years; this.paybackVal = del(sum, interest, years); }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest type) { Interest = interest; Years = years; this.type = type; Money = money; }
public InterestCalculator(decimal sum, decimal interest, int period, CalculateInterest kindOfInterest) { this.Sum = sum; this.Interest = interest; this.Period = period; this.kindOfInterest = kindOfInterest; this.Result = kindOfInterest(sum, interest, period); }
public InterestCalculator(decimal sum, double interest, int years, CalculateInterest method) { this.sum = sum; this.interest = interest; this.years = years; this.method = method; this.result = this.method(this.sum, this.interest, this.years); }
public InterestCalculator( double sum, double interest, int years, CalculateInterest calculateMethod) { this.Sum = sum; this.Interest = interest; this.Years = years; this.CalculatedInterest = calculateMethod(this.Sum, this.Interest, this.Years); }
public InterestCalculator(double moneySum, double interest, int years, CalculateInterest interestDelegate) { this.Money = moneySum; this.Interest = interest; this.Years = years; this._interestDelegate = interestDelegate; }
public InterestCalculator(decimal sum, double interest, int years, CalculateInterest interstCalculation) { this.Sum = sum; this.Interest = interest; this.Years = years; this.interestCalculation = interstCalculation(sum, interest, years); this.typeOfCalculation = new CalculateInterest(interstCalculation); }
static void Main(string[] args) { CalculateInterest interest = new CalculateInterest(GetSimpleInterest); interest(2500m, 7.2m, 15); interest = GetCompoundInterest; interest(500m, 5.6m, 10); }
public InterestCalculator(double money, double interest, int years, CalculateInterest interestCalculationDelegate, string type) { this.Money = money; this.Interest = interest; this.Years = years; this.interestCalculationDelegate = interestCalculationDelegate; this.Type = type; }
public InterestCalculator(decimal money, float interest, int years, CalculateInterest interestCalculation) { this.Money = money; this.Interest = interest; this.Years = years; this.InterestCalculation = interestCalculation; this.MoneyAfterIdexation = InterestCalculation(money, interest, years); }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest method) { Money = money; Interest = interest; Years = years; this.caclulationMethod = method; }
public double?TotalInterest() { if (_totalInterest == null) { _totalInterest = CalculateInterest.Calculate(Wallets); } return(_totalInterest); }
public double?TotalInterest() { if (_totalInterest == null) { _totalInterest = CalculateInterest.Calculate(InterestRate(), _balance); } return(_totalInterest); }
public void CalculateCompoundInterestStringValue__ShoulReturnErrorWhenInterestRateIsLessThanZero(string initialValue) { CalculateInterest calculateInterest = new CalculateInterest(); double interestRate = -0.01; int months = 0; var result = calculateInterest.CalculateCompoundInterestStringValue(initialValue, interestRate, months); Assert.Equal("[API1] - O serviço integrado retornou um valor para taxa de juros negativo.", result); }
public static void Main() { CalculateInterest simpleInterestCalculationDelegate = GetSimpleInterest; CalculateInterest compoundInterestCalculationDelegate = GetCompoundInterest; InterestCalculator simpleCalc = new InterestCalculator(2500, 7.2, 15, simpleInterestCalculationDelegate, "simple"); InterestCalculator compoundCalc = new InterestCalculator(500, 5.6, 10, compoundInterestCalculationDelegate, "compound"); Console.WriteLine(simpleCalc); Console.WriteLine(compoundCalc); }
public InterestCalculator( double sum, double interest, int years, CalculateInterest interestdelegate) { this.Sum = sum; this.Interest = interest; this.Years = years; this.interestdelegate = interestdelegate; }
static void Main() { Console.Write("Type amount of money: "); decimal money = decimal.Parse(Console.ReadLine()); Console.Write("Type interest: "); double interest = double.Parse(Console.ReadLine()); Console.Write("Type years: "); int years = int.Parse(Console.ReadLine()); CalculateInterest d = new CalculateInterest(GetSimpleInterest); d += GetCompountInterest; InterestCalculator calc = new InterestCalculator(money, interest/100, years); Console.Write("Enter the type of the interest(simple or compound): "); calc.Type = Console.ReadLine(); if (calc.Type == "compound") { d -= GetSimpleInterest; } else if (calc.Type == "simple") { d -= GetCompountInterest; } while (calc.Type != "compound" && calc.Type != "simple") { Console.Write("Try again: "); calc.Type = Console.ReadLine(); if (calc.Type == "compound") { d -= GetSimpleInterest; } else if (calc.Type == "simple") { d -= GetCompountInterest; } } calc.OnInterest += d; calc.Run(); }
public InterestCalculator(decimal money, double interest, double years, CalculateInterest calculate) { this.calculatedInterest = calculate(money, interest, years); }