-
Notifications
You must be signed in to change notification settings - Fork 0
Comments
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Молодец, что добавил класс Product. Но на счет методов printAdd() и print() я бы подумал. Это все таки вывод текста в консоль, а класс Product должен содержать только логику относящуюся к product. Можно было бы например сделать метод
public void getStringProductWasAdd() { return "Блюдо: " + name + " по цене " + price + " рублей" + " добавленно"; } и в процессе выполнения программы вызвать System.out.println(getStringProductWasAdd()). Но это не сильно важно, просто на подумать.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Принцип единственной ответственности https://habr.com/ru/companies/ruvds/articles/426413/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
регулярные выражения это круто, но нужно много времени, чтобы с ними нормально разобраться. И если ты только начинаешь программировать, то я бы не стал пока что с ними заморачиваться. Они не очень часто используются
Моя реализация консольного приложения: «Калькулятор счёта»