Ass 5 (Property - Collection-Iterator)
Ass 5 (Property - Collection-Iterator)
Ass 5 (Property - Collection-Iterator)
2 Class BankA has a collection SortedList<String,Account> named arList to store Account objects.
Methods:
- void AddNewAcc()
- IEnumerator<Account> GetEnumerator() return list of accounts.
- Account Search(String AccNo) return object Account which Account no is AccNo, or return null if
not found.
- void Transfer ( Account sender, Account receiver, int amount) transfers money between the
two accounts sender and receiver
- void Deposit ( string AccNo, int amount ) doing deposit transaction
- void Withdraw ( string AccNo, int amount ) withdraw transaction