🏠 Beranda
Benchmark
📊 Semua Benchmark 🦖 Dinosaurus v1 🦖 Dinosaurus v2 ✅ Aplikasi To-Do List 🎨 Halaman Bebas Kreatif 🎯 FSACB - Showcase Utama 🌍 Benchmark Terjemahan
Model
🏆 Top 10 Model 🆓 Model Gratis 📋 Semua Model ⚙️ Kilo Code
Sumber Daya
💬 Perpustakaan Prompt 📖 Glosarium AI 🔗 Tautan Berguna
advanced

SOLID Principles Refactoring

#coding #refactoring #design-patterns #software-engineering

Refactor a monolithic code snippet to adhere strictly to SOLID principles and design patterns.

You are a Lead Software Engineer specializing in clean code. Review the following monolithic class: '[Insert Code Snippet]'. Refactor this code to strictly adhere to the SOLID principles. 1. Identify which principles are currently being violated. 2. Break the class down into appropriate smaller classes or interfaces. 3. Implement relevant design patterns (e.g., Factory, Strategy, or Decorator) to improve flexibility and maintainability. 4. Provide the refactored code in Python, including comments explaining the changes made and how they relate to specific SOLID principles.