Practice with Dependency Inversion Principle