Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So I have been learning about SOLDID-principles.

The I states that you should not have unnecessary methods.

In SOLID I stands for Interface Segregation principle.

But do you need an interface to apply this method?

Isn't it the same for a class?

What I have tried:

I have checked other articles both here and Googled it.
Posted
Updated 30-May-17 2:38am

1 solution

Interfaces make applying this easier but it's not required. You can achieve this using inheritance and classes that have a narrower scope of methods. However to do properly interfaces makes it a lot easier.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900