-
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.
Можно сделать метод у класса PricePlurals тоже static, как и его поля, чтобы не пришлось создавать единственный экземпляр класса для однократного использования
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.
В конструктор лучше передавать то, чтобы необходимо снаружи класса передать внутрь класса для использования им. Если что-то можно и так создать внутри класса, то лучше так и сделать. Например, экземпляр BufferedReader можно создать внутри класса Calculator, PricePlurals сделать static
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.
Такие подряд идущие println можно объединить в один.
Сдаю проектную работу!