DigestCPP

Lets Understand With Example

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

Interface segregation

What is Interface segregation ?

This principle defines that interface should be thin in nature, in other word it should contain ONLY required API’s  that are needed. It defines that interface should not be FAT in nature, in other word it should not contain many API’s  that are not needed.

This design principle is used when we create Base class and its API.

When we will get to know that We did not follow this Design principle ?

If we are creating a derived class and we are forced to define the empty virtual function then we are NOT following “interface segregation” and our base interface is FAT and it contains many not required API. This should be corrected.

 

Primary Sidebar




DigestCPP © 2023. All rights reserved.

    About Privacy Policy Terms and Conditions Contact Us Disclaimer