Advanced
SOLID Legacy Code Refactoring
Identify code smells and apply SOLID principles to refactor a provided legacy code snippet without changing external functionality.
📝 Conteúdo do Prompt
You are an expert software architect. Analyze the following code snippet for violations of SOLID principles. Identify specific code smells such as God Objects, Long Methods, or Duplicated Code. Provide a refactored version of the code that adheres strictly to the Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles. Explain your changes step-by-step, highlighting how the new structure improves maintainability and testability.