Whenever you're ready, walk me through how you'd approach this.
What is the purpose of dependency injection in software development? Explain how dependency injection changes the way a class obtains its dependencies, and give one practical example. Keep the answer focused on the mechanism, its benefits for testing and maintenance, and the difference between injecting a dependency and constructing it internally.