A smart aleck has provided you the following class:
using TransactionCollection = std::list;
class Checkbook {
public:
using iterator = TransactionCollection::iterator;
using const_iterator = TransactionCollection::const_iterator;
private:
std::string title;
Person accountHolder;
TransactionCollection transactions;
public:
// title and accountHolder accessors
// ...
// title and accountHolder mutators
// ...
};
Assume that TransactionCollection, Transaction, and Person are defined elsewhere.
What functions must be added to Checkbook to allow Checkbook::iterator and
Checkbook::const_iterator to be used outside the Checkbook class?
"iterator end()"
"const_iterator begin() const" or "cbegin()"
initialize()
"iterator begin()"
"const_iterator end() const" or "cend()"
iterator()