public override string CalculateIterest(decimal numberOfMonths)
 {
     if (Coustomer.GetType().Name.CompareTo("Individual") == 0)
     {
         if (numberOfMonths <= 6)
         {
             return("Individuals have no interest for the first 6 months! ");
         }
         return(((numberOfMonths - 6) * this.InterestRate).ToString());
     }
     else
     {
         if (numberOfMonths <= 12)
         {
             return((numberOfMonths * (this.InterestRate * 0.5M)).ToString());
         }
         return((12 * ((this.InterestRate / 100) * 0.5M)) + ((numberOfMonths - 12) * (this.InterestRate / 100)).ToString());
     }
 }
示例#2
0
 public override string CalculateIterest(decimal numberOfMonths)
 {
     if (Coustomer.GetType().Name.CompareTo("Individual") == 0)
     {
         if (numberOfMonths <= 3)
         {
             return("Individuals have no interest for the first 3 months! ");
         }
         return(((numberOfMonths - 3) * (this.InterestRate / 100)).ToString());
     }
     else
     {
         if (numberOfMonths <= 2)
         {
             return("Companies have no interest for the first 2 months! ");
         }
         return(((numberOfMonths - 2) * this.InterestRate).ToString());
     }
 }
示例#3
0
 public Loan(Coustomer coustomer, decimal balance, decimal interestRate)
     : base(coustomer, balance, interestRate)
 {
 }
示例#4
0
 public Account(Coustomer coustomer, decimal balance, decimal interestRate)
 {
     this.Coustomer    = coustomer;
     this.Balance      = balance;
     this.InterestRate = interestRate;
 }
示例#5
0
 public Loan(Coustomer coustomer, decimal balance, decimal interestRate)
     : base(coustomer, balance, interestRate)
 {
 }
 public Mortgage(Coustomer coustomer, decimal balance, decimal interestRate)
     : base(coustomer, balance, interestRate)
 {
 }
 public Deposite(Coustomer coustomer, decimal balance, decimal interestRate)
     : base(coustomer, balance, interestRate)
 {
 }
 public Deposite(Coustomer coustomer, decimal balance, decimal interestRate)
     : base(coustomer, balance, interestRate)
 {
 }
 public Mortgage(Coustomer coustomer, decimal balance, decimal interestRate)
     : base(coustomer, balance, interestRate)
 {
 }
示例#10
0
 public Account(Coustomer coustomer, decimal balance, decimal interestRate)
 {
     this.Coustomer = coustomer;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }