public void calculateMonthInterestRate() { Integer fee = type.getFee(); Double interestRate = type.getInterestRate(); if (fee != null) { balance -= fee; if (balance < 0) frozen = true; } else if (interestRate != null) balance *= (1 + interestRate); }