# Single Responsibility Principle

A class should have one job, and so only one reason to change.

## What is **Single Responsibility Principle**?

The **Single Responsibility Principle** says a class should have one job, so it has only one reason to change. A class that calculates payroll should not also format the PDF report.

```csharp
// Split one big class into focused ones
public class PayrollCalculator { /* works out pay */ }
public class PayslipPdfWriter  { /* turns pay into a PDF */ }
```

Level: Freelancer · [More OOP terms at this level](https://www.ask-codey.com/glossary/subjects/oop/freelancer)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/single-responsibility-principle
