public void giveCredit(Client client, Credit credit) { if (reserv - credit.getAmount() - calculateMonthlyDepositAccumulations() > 0) { if (client.askForCredit(credit)) { bankProducts.add(credit); reserv -= credit.getAmount(); capital -= credit.getAmount(); } } else { System.out.println( "Bank doesn't have enough money in reserve to give " + credit.getAmount() + " as credit"); } }
void collectCredit(Credit credit) { reserv += credit.getMonthlyCreditInstallment(); capital += credit.getMonthlyCreditInstallment(); }