Example #1
0
 /**
  * Debits the inhabitant's bank account with amount
  *
  * @param amount
  */
 public void debit(int amount) {
   bankAccount.debit(amount);
   Displayer.getDisplayer()
       .display(
           " -"
               + amount
               + " euro"
               + ((amount > 1) ? "s are" : " is")
               + " debited from "
               + name
               + " whose "
               + bankAccount.balanceToString()
               + "\n");
 }
Example #2
0
 /**
  * Credits the inhabitant's bank account with amount
  *
  * @param amount
  */
 public void credit(int amount) {
   bankAccount.credit(amount);
   Displayer.getDisplayer()
       .display(
           " +"
               + name
               + " account is credited with "
               + amount
               + " euro"
               + ((amount > 1) ? "s" : "")
               + ", its "
               + bankAccount.balanceToString()
               + "\n");
 }