public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest deleg) { this.years = years; this.deleg = deleg; this.interest = interest; this.money = money; }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest type) { this.Years = years; this.Type = type; this.Interest = interest; this.Money = money; }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest calcInterest) { this.money = money; this.interest = interest; this.years = years; this.calcInterest = calcInterest; }
public InterestCalculator(decimal sum, decimal interest, int years, CalculateInterest interestCalculation) { this.Sum = sum; this.Interest = interest; this.Years = years; this.InterestCalculation = interestCalculation; }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest del) { this.Money = money; this.Interest = interest; this.Years = years; this.PaybackValue = del(money, interest, years); }
public InterestCalculator(decimal money, decimal interest, decimal years, CalculateInterest interestMethod) { this.Money = money; this.Interest = interest; this.Years = years; this.InterestMethod = interestMethod; }
public InterestCalculator(decimal money,decimal interestRate,int years,CalculateInterest result) { this.Money = money; this.InterestRate = interestRate; this.Years = years; this.Result = result; }
//constructors public InterestCalculator(int money, double 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 calculation) { this.Sum = SumMoney; this.Interest = Interest; this.Years = years; result = calculation(this.Sum, this.Interest, this.Years); }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest calculationMethod) { this.Money = money; this.Interest = interest; this.Years = years; this.calculation = calculationMethod; }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest del) { this.Money = money; this.Interest = interest; this.Years = years; this.Del= del; }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest calculationMethod) { this.Money = money; this.Interest = interest; this.Years = years; this.calculationMethod = calculationMethod; }
public InterestCalculator(double sumOfMoney, double interest, int years, CalculateInterest function ) { this.SumOfMoney = sumOfMoney; this.Interest = interest; this.Years = years; this.calculationMethod = function; }
public InterestCalculator(decimal moneySum, decimal interest, int years, CalculateInterest simpleOrCompound) { this.MoneySum = moneySum; this.Interest = interest; this.Years = years; this.Result = simpleOrCompound(moneySum, interest, years); }
public InterestCalculatorClass(decimal sum, decimal interest, int years, CalculateInterest delegat) { this.Sum = sum; this.Interest = interest; this.Years = years; this.Delegat = delegat; }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest type) { this.Money = money; this.Interest = interest; this.Years = years; this.result = type(money, interest, years); }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest dlg) { this.MoneyAmount = money; this.Interest = interest; this.Years = years; this.InterestCalcMethod = dlg; this.GetInterestAmount = dlg(money, interest, years); }
public InterestCalculator(decimal money, decimal interest, int years, CalculateInterest calculateInterest) { this.Money = money; this.Interest = interest; this.Years = years; this.calculateInterest = new CalculateInterest(calculateInterest); this.Result = result; }
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 simple = new CalculateInterest(GetSimpleInterest); CalculateInterest compound = new CalculateInterest(GetCompoundInterest); Console.WriteLine("{0:F4}", compound(500m, 5.6m, 10)); Console.WriteLine("{0:F4}", simple(2500m, 7.2m, 15)); }
public InterestCalculator(Decimal SumMoney, double Interest, int years,CalculateInterest calculation) { this.Sum = SumMoney; this.Interest = Interest; this.Years = years; result = calculation(this.Sum,this.Interest,this.Years); }
static void Main(string[] args) { CalculateInterest simpleInterestMethod = InterestCalculationMethods.GetSimpleInterest; CalculateInterest compoundInterestMethod = InterestCalculationMethods.GetCompoundInterest; var simpleInterest = new InterestCalculator(500m, 5.6m, 10, compoundInterestMethod); var compoundInterest = new InterestCalculator(2500m, 7.2m, 15, simpleInterestMethod); simpleInterest.PrintInterest(); compoundInterest.PrintInterest(); }
private void btn_calculate_Click(object sender, EventArgs e) { double pricipal= Convert.ToDouble(tbox_pricipal.Text); double time = Convert.ToDouble(tbox_time.Text); double rate = Convert.ToDouble(tbox_rate.Text); CalculateInterest interest = new CalculateInterest(pricipal, time, rate); double result = interest.getInterest(); lbl_result.Text = "Interest is: " + result.ToString(); }
static void Main() { CalculateInterest d1 = new CalculateInterest(InterestCalculator.GetSimpleInterest); InterestCalculator simpleInterest = new InterestCalculator(2500m, 0.072m, 15, d1); Console.WriteLine(simpleInterest); CalculateInterest d2 = new CalculateInterest(InterestCalculator.GetCompoundInterest); InterestCalculator compoundInterest = new InterestCalculator(500m, 0.056m, 10, d2); Console.WriteLine(compoundInterest); }
private void btn_calculate_Click(object sender, EventArgs e) { double pricipal = Convert.ToDouble(tbox_pricipal.Text); double time = Convert.ToDouble(tbox_time.Text); double rate = Convert.ToDouble(tbox_rate.Text); CalculateInterest interest = new CalculateInterest(pricipal, time, rate); double result = interest.getInterest(); lbl_result.Text = "Interest is: " + result.ToString(); }
static void Main() { CalculateInterest del = new CalculateInterest(GetCompoundInterest); InterestCalculator interest = new InterestCalculator(500, 5.6m, 10, del); Console.WriteLine("Money: {0}, Interest: {1}%, Years: {2}, Type: compound, Result: {3}", interest.Money, interest.Interest, interest.Years, interest.Del(interest.Money, interest.Interest, interest.Years)); del -= GetCompoundInterest; del += GetSimpleInterest; InterestCalculator simpleInterest = new InterestCalculator(2500, 7.2m, 15, del); Console.WriteLine("Money: {0}, Interest: {1}%, Years: {2}, Type: simple, Result: {3}", simpleInterest.Money, simpleInterest.Interest, simpleInterest.Years, simpleInterest.Del(simpleInterest.Money, simpleInterest.Interest, simpleInterest.Years)); }
public InterestCalculator(decimal money, double interest, int years, CalculateInterest del) { this.PaybackValue = del(money, interest, years); }