public LoanDuration(Integer durationYears) {
        if (durationYears < MAX_DURATION && durationYears > MIN_DURATION) {
            this.durationYears = durationYears;
        } else {
            throw new IllegalArgumentException("Loan duration should be between " + MIN_DURATION+" and "+MAX_DURATION);
        }
    }