Pregunta de entrevista de Tata Consultancy Services

Basic oops question, dependency injection