Class CreditCardAccount

java.lang.Object
com.dada.banking_project.models.Accounts.Account
com.dada.banking_project.models.Accounts.CreditCardAccount

@Entity public class CreditCardAccount extends Account
  • Constructor Details

  • Method Details

    • setCreditLimit

      public void setCreditLimit(BigDecimal creditLimit)
      Set the credit limit for this CreditCard account.
      Parameters:
      creditLimit - The credit limit to set, must be greater than 100 and less than or equal to 100000
      Throws:
      IllegalArgumentException - if credit limit is less than 100 or greater than 100000
    • getCreditLimit

      public BigDecimal getCreditLimit()
      Get the credit limit for this CreditCard account.
      Returns:
      The credit limit for this account.
    • setInterestRate

      public void setInterestRate(BigDecimal interestRate)
      Set the interest rate for this CreditCard account.
      Parameters:
      interestRate - The interest rate to set, must be less than or equal to 0.2 and greater than or equal to 0.1
      Throws:
      IllegalArgumentException - if interest rate is greater than 0.2 or less than 0.1
    • getInterestRate

      public BigDecimal getInterestRate()
      Get the interest rate for this CreditCard account.
      Returns:
      The interest rate for this account.