Mid GoF Patterns

Concrete Iterator (ProductIterator):?

  • The ProductIterator class implements the IIterator<Product>

interface and keeps track of the current position in the

ProductCollection. It knows how to traverse the collection, check if

there’s a next item (HasNext()), and return the next item (Next()).

More from Design Patterns in C#

All questions for this course