/
beks89
/
Homework10
Обзор
Документация
Войти
/
beks89
/
Homework10
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Checker.java
27 строк
734 B
beks89
upload files
14 апр 2025, 17:49
14 апр 2025, 17:49
71bf06d
Код
Авторство
О чём код?
public class Checker { int minLength; int maxRepeats; public void setSetMinLength(int minLength) { if (minLength <= 0) { throw new IllegalArgumentException("Password can't be negative number"); } this.minLength = minLength; } public void setSetMaxRepeats(int maxRepeats) { if (maxRepeats <= 0) { throw new IllegalArgumentException("Repeats have to be positive number"); } this.maxRepeats = maxRepeats; } public boolean check(String password) { if (password.equals(minLength) && password.equals(maxRepeats)) { return true; } else { return false; } } }