A class has 3,000 lines and handles HTTP parsing, billing rules and PDF generation. This code smell is called…
Options
- Feature envy
- God object (Correct option)
- Shotgun surgery
- Primitive obsession
Answer
God object
Why
A 'god object' knows and does too much. It breaks the Single Responsibility Principle: many unrelated reasons to change, hard to test, and every developer edits it, causing conflicts.
Fix gradually: write tests around it, then extract cohesive classes (HttpParser, BillingRules, PdfRenderer).
Remember
Huge class doing everything = god object; split by responsibility.