Split a large class into smaller ones
Break an oversized class into smaller, focused classes with clean interfaces between them. Includes updated test stubs for each new class.
Preview
Copy prompt
This class has accumulated too many responsibilities and is violating the Single Responsibility Principle: [Paste code]. Identify each distinct responsibility the class currently handles. Propose a split into two or more focused classes with clearly defined interfaces between them and show the refactored code. Provide updated test stubs for each new class that demonstrate how they can be tested in complete isolation from one another.
More
Refactoring
Prompts
