Let’s use as example:
class AccountDAO {
create(){..}
read(){..}
update(){..}
delete() {..}
}
How many responsibilities are there? 1 or 4?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SRP shouldn’t be understood in a strict manner. One object should have very few responsibilities, not “one”.
Here AccountDAO is only responsible for Account persistence, so it has only one responsibility.