EPAM Systems interview question

In this code snippet, implement the Dependency Inversion concept (D from SOLID).