Multiple choice

Which of the following is/are correct about Aggregate interface in Iterator design pattern?

  1. It declares an interface to define the methods for the client.

  2. Client code should not be concerned about the details of the implementations.

  3. It provides a way to access the elements of aggregate objects sequentially without exposing its representation.

  4. All of the above.

  5. Both (1) and (3).

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

These are the correct statements about Iterator pattern.