Loading lesson…
Level 1 · Apprentice0 XP
A class should have one reason to change, and its parts should belong together.
Step 1 / 6
ProblemUserManager registers users, hashes passwords, sends emails, exports CSV and builds reports. Every team edits it. Merge conflicts every week. Its test needs eleven mocks.
← → step
Before this: Objects, data and 'tell, don't ask'
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Pick your largest class. List each method and the fields it uses. Group methods that share fields, and extract the clearest group into its own class with an honest name.