A class should have one reason to change. For example,
public class Report
{
public string GenerateContent() { ... }
public void PrintToPdf() { ... }
public void SaveToFile() { ... }
}
… violates this principle because content generation, PDF formatting, and file storage are all in one place.
Instead, split the responsibilities into separate classes:
public class Report
{
public string GenerateContent() { ... }
}
public class PdfPrinter
{
public void Print(Report report) { ... }
}
public class FileStorage
{
public void Save(string content) { ... }
}
- Design Principles | Hello Interview Low Level Design. www.hellointerview.com . Accessed Sep 13, 2026.
- web_contents.h - Chromium Code Search. source.chromium.org . Accessed Sep 13, 2026.
What defines “reason”? Do reasons map to user-facing requirements?