DigestCPP

Lets Understand With Example

  • Home
  • Design Principal
  • Design Patterns
  • C++ 11 Features
  • C++11 Multithreading
  • Contact Us

Single Responsibility Principle

What is single responsibility principle

It defines that each and every class or module should have single responsibility.
In other word we can say that every object should have single responsibility and there is only one reason to change it.

Example:

class car, It should contain only relevant function in it. like start and stop. we should not include irrelevant function in it.

Primary Sidebar




DigestCPP © 2023. All rights reserved.

    About Privacy Policy Terms and Conditions Contact Us Disclaimer