What is your best example of a violation of the Single Responsibility Principle?

Posted by Jon Kruger on Stack Overflow See other posts from Stack Overflow or by Jon Kruger
Published on 2009-08-30T18:57:01Z Indexed on 2010/05/23 2:20 UTC
Read the original article Hit count: 292

Filed under:
|

I'm looking for some good examples of code that violates the Single Responsibility Principle. Don't show me any examples from Uncle Bob's books or web sites since those are plastered all over the internet, like this one:

interface Modem
{
    public void dial(String pno);
    public void hangup();
    public void send(char c);
    public char recv();
}

© Stack Overflow or respective owner

Related posts about solid

Related posts about srp