What is the One Class, One Responsibility Principle?
问题 I would like to learn about the One Class, One Responsibility principle. I have found some articles about it, but without examples. It would help me if you can give me an example of a class that violates the principle. I'm familiar with the idea that a method should do only one thing, for instance get and set methods. It must not be the same as One Class, One Responsibility , because set and get methods are both implemented inside a class. So does this mean the class is violating the rule