public class AccumulateSavingsBatch { private Bank bank; public void setBank(Bank bank) { this.bank=bank; } public void doBatch() { for (Customer c : bank) { for (Account a : c) { if(a instanceof SavingAccount) { a.accumulateIntersest(); } } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)