Exemplo n.º 1
0
 public override double CalculateInterestAmount(int number_of_months)
 {
     if (Customer.GetType().Name == "CompaniesCustomer")
     {
         if (number_of_months <= InterestMonthsCompanies)
         {
             return((this.InterestRate * number_of_months) / 2);
         }
     }
     if (Customer.GetType().Name == "IndividualCustomer")
     {
         if (number_of_months <= InterestMonthsIndividuals)
         {
             throw new ArgumentException(NoInterestIndividual);
         }
     }
     return(this.InterestRate * number_of_months);
 }