Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Евгений Ким. Консольное приложение No1 v1.0#105

Open
byBlinque wants to merge 2 commits intoYandex-Practicum:master from
byBlinque:master
Open

Евгений Ким. Консольное приложение No1 v1.0 #105
byBlinque wants to merge 2 commits intoYandex-Practicum:master from
byBlinque:master

Conversation

@byBlinque
Copy link

@byBlinque byBlinque commented Oct 30, 2022

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

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

int peopleNumber = 0;
Copy link

@faritowich faritowich Oct 30, 2022

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("Завершить")) {
Copy link

@faritowich faritowich Oct 30, 2022

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 "рублей";
Copy link

@faritowich faritowich Oct 30, 2022

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;
}
Copy link

@faritowich faritowich Oct 30, 2022

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

Reviewers

1 more reviewer

@faritowich faritowich faritowich left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /