An enumerator is a class with getNextObject method. It encapsulates the container. Write an enumerator. Next, write a new enumerator called chained-enumerator which is initialized by two other enumerators. Finally, how would you make it work with N enumerators. I had to write the logic for getNextObject for the most part (and any other internal state I wanted to manage).
Anónimo
I was slightly taken a back initially because it sounded just too simple - but quickly gained my ground again and did pretty okay. Work yourself thru a test case first and in the end dry-run it all the way.