Using the DI pattern

Which of the following are valid statements that can be made about the Dependency Injection design pattern?

S1: The injector class of the DI pattern creates an object of the service class.

S2: The DI pattern separates the responsibility of creating an object of the service class out of the client class.

  1. Only S1
  2. Only S2
  3. Both S1 and S2
  4. Neither S1 and S2

Related Posts