Hello, everybody. I'm stuck on an assignment I've been given recently. Looks like I've missed many lectures in programming.
Here's the thread. I'm just asking for some hints, really, I'd appreciate that.
The problem: Write a complete program with at least one example for using all interface functions of the corresponding ADT: Implement the ObjectIterator ADT to the NodeList class and complete print function.
I also have a code fragment:
template <typename Object>
void print(NodeList<Object>& L) { // print a NodeList
NodeList<Object>::ObjectIterator iter = L.elements(); // element iterator
while (iter.hasNext()) { // while more remain
cout << iter.next() << " "; // print next/advance
}
}
So what should I do about it?
Thanks!