advanced
Legacy Code Architecture Refactoring
Analyze and refactor a block of legacy procedural code into modern object-oriented design patterns.
📝 プロンプトの内容
Act as a Principal Software Engineer. I will provide you with a snippet of legacy code that utilizes global state and procedural logic. Your task is to: 1. Identify specific code smells and coupling issues. 2. Refactor the code into a modern, modular architecture using SOLID principles. 3. Justify every structural change you make, referencing specific design patterns (e.g., Factory, Strategy, Observer) where applicable. 4. Provide the refactored code in Python, ensuring type hinting is included. Wait for the code input.