Multiple choice

Which of the following is an incorrect statement about 'Strategy' design pattern?

  1. It declares an interface common to all supported algorithms.

  2. A strategy interface is used to implement the class for the algorithms.

  3. It allows an object to alter its behaviour when its internal state changes.

  4. It maintains a reference to a strategy object.

  5. It may define an interface that lets strategy access its data.

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

It can alter the behaviour of the object. State pattern is used to alter the state of the object.