Hey nice work. But I'd suggest one small change. Your getTransactions() method should simply "return transactions", nothing else.
In your main, then you can do: ArrayList transactions =...
Type: Posts; User: Squiffy
Hey nice work. But I'd suggest one small change. Your getTransactions() method should simply "return transactions", nothing else.
In your main, then you can do: ArrayList transactions =...
I think your Account class looks OK. But you need a getTransactions() method that returns the ArrayList of transactions.
The Transaction class does not need a list of transactions though. In your...
Firstly, you need to make sure that the transaction arraylist in your Account class is set to a new arraylist somewhere. Otherwise you've just got an empty reference that could refer to an array list...