Group 6: Iterators
This group of topics relate to understanding how to use and write iterators.
Making it easier for the users of your class to iterate through all of the elements in a collection is one way to make your code easier to use. Thinking about how to implement an iterator is also a great way to think about the difference between interface and implementation!
Topics
You will know that you have achieved this group of learning objectives when you are able to
- Goal 6A: Iterator Definition:
- Explain what iterators are and why they are useful.
- Goal 6B: Using Iterators:
- Read and write C++ code using the standard C++ iterator idiom, including:
const
iterator
const_iterator
- Read and write C++ code using the standard C++ iterator idiom, including:
- Goal 6C: Iterator Interface:
- Explain the required outcomes of begin, end, and iterator operations in the C++ iterator interface.
- Goal 6D: Iterator validity:
- Explain why iterators can cease to be valid and identify common operations that cause iterators to no longer be valid.
Need More Practice?
This group of goals are addressed in the following places:
- Week 7 Lesson 2 (Goal 6A, Goal 6B, Goal 6C)
- Week 8 Lesson 1 (Goal 6C, Goal 6D)
- Homework 5 (Goal 6B, Goal 6C)
(When logged in, completion status appears here.)