Skip to content

Conversation

@byBlinque
Copy link

Евгений Ким. Консольное приложение №1 v1.0

Scanner scanner = new Scanner(System.in);
scanner.useLocale(Locale.US);

int peopleNumber = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно не задавать начальное нулевое значение, так как затем всё равно происходит присваивание через scanner.nextInt();


System.out.println("Хотите добавить еще товар? Чтобы завершить, введите \'Завершить\'");
contunieGoodAdding = scanner.next();
if (contunieGoodAdding.equalsIgnoreCase("Завершить")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно сделать из этого цикла while цикл do-while и вынести это условие в while()

return "рубля";

default:
return "рублей";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не хватает ключевого слова break для работы конструкции switch-case

String goodName = "";
double goodPrice;
double goodSumPrice = 0.0;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Конструктор не используется. Его можно убрать.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants