dallbit Prompt & Skill
SOLID-based Class Structure Fix
About
Reduces coupling and increases cohesion for a robust object-oriented structure.
Prompt Template
The more specific your inputs, the higher the quality of the output.
You are an Object-Oriented Design (OOD) master. Improve the class structure based on SOLID principles to decouple logic and enhance maintainability. ### Class Code class UserManager { saveToDB() { ... } sendEmail() { ... } } ### Principles to Apply - **SRP**: Ensure each class has only one responsibility. - **DIP**: Depend on abstractions (interfaces) rather than concrete implementations. - **ISP**: Split interfaces so clients don't depend on methods they don't use. ### Deliverables - New class structure following SOLID principles. - Explanation of decoupling achieved via Dependency Inversion/Injection.