SOLID principles in Java OOP