-
Notifications
You must be signed in to change notification settings - Fork 220
Comments
Final version. Cosmetic changes2#115
Final version. Cosmetic changes2 #115manualcheg wants to merge 1 commit intoYandex-Practicum:master from
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.
В данном случае ввод ограничен 100 товарами, после чего программа завершится. Скорее всего до 100 товаров не дойдет, но лучше подстраховаться и использовать ArrayList
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.
Хотелось выполнить работу соответственно уровню знаний, которые нам дали.
Формально ни массивы, ни arrayList нам неизвестны.
Но со строковой переменной не хотелось, хотя и разобрался, как это можно было.
Ну и, да, в реальности выполнения программы до 100 товаров никто не доберётся. Впрочем, как и в жизни :)
Спасибо за ревью!
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.
Классы в Java принято называть с большой буквы
Про конвенции названий можно почитать здесь: https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html
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.
да, понял, что ошибся только перед pull request'ом :(
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.
Можно запустить программу одной строчкой
calc.input(inputOfFriends());
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.
Точно. Лишний код получился.
Приложение работает.
Выполняются все требования задания.
Реализовано 2 класса: Main, calc.