Advanced
Legacy Code Architecture Refactor
Refactor a monolithic code snippet into a modular architecture using SOLID principles.
📝 Contenu du Prompt
Act as a Senior Software Architect. Analyze the provided legacy code block. Identify code smells, violations of SOLID principles, and potential security vulnerabilities. Refactor the code into a modular structure utilizing the Strategy and Factory patterns. Ensure the refactored code is type-safe, includes comprehensive error handling, and provide a brief explanation of the architectural changes made.