示例#1
0
  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");
    }
  }
示例#2
0
  void collectCredit(Credit credit) {

    reserv += credit.getMonthlyCreditInstallment();
    capital += credit.getMonthlyCreditInstallment();
  }