Dependency Injection: With Examples in Java, Ruby, and C#