advanced
Legacy Code Modernization Strategy
Request a comprehensive refactoring plan for a provided legacy code snippet, focusing on design patterns and performance.
📝 Содержимое промпта
Act as a Senior Software Architect. I will provide a snippet of legacy code. Your task is to: 1) Identify code smells and violations of SOLID principles. 2) Propose a refactoring strategy using modern design patterns suitable for the language. 3) Provide the refactored code. 4) Write unit tests to verify that the external behavior remains unchanged while internal structure improves. Explain your architectural choices in depth.