Answer the question
In order to leave comments, you need to log in
Why is Segregation of Responsibility important?
Hello!
The explanation of "Why is SoC so important?" SoC , specifically
Keeping different responsibilities together in a single class, you have to maintain their consistency simultaneously in every operation within this class. That quickly leads to a combinatorial explosion.
a huge amount of combinations in which elements of these concerns can interact with each other.?
Answer the question
In order to leave comments, you need to log in
Abstract if, pseudocode
password = Window.TextBoxPassword.Value
if (!password.RegexMatch('^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#[email protected]$ %^&*-]).{8,}$"))
Window.ValidationText.Text = "Пароль слишком слабый";
else
try
connection = new Connection("connecttion string to database");
.RunSQL("update users set password = @password where username = @user"
catch
Window.ResultMessage.Text = "Ошибка"
Window.ResultMessage.Text = "Пароль изменён"
password = GetUserInput();
if (ValidatePassword())
{
UpdateUserPassword()
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question