Apply the SOLID Principles to Java Code