Single Responsibility Principle (SRP): For a class, there should be only one reason for its change. If a class has too many responsibilities, it is equivalent to coupling these responsibilities. A change in responsibilities may weaken or suppress the class's ability to fulfill other responsibilities. When a change occurs, the design will be unexpectedly damaged. Much of software design really needs to do is to discover accusations and separate those responsibilities. If you modify a class for more than one reason, this class has more than one responsibility.
Code Source: Agile Software Development (C)
1 public interface Modem
2 {
3 public void Dial (string pno );
4 public void Hangup ();
5 public void Send (char c );
6 public char Recv ();
7}
The interface shows two responsibilities:
1. Connection Management: the Dial and Hangup functions are used to manage modem connections.
2. Send and Recv data communication.