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

release#11

Open
Kotzimaru wants to merge 5 commits intoYandex-Practicum:master from
Kotzimaru:master
Open

release #11
Kotzimaru wants to merge 5 commits intoYandex-Practicum:master from
Kotzimaru:master

Conversation

@Kotzimaru
Copy link

@Kotzimaru Kotzimaru commented Aug 19, 2022

release

countPeople = Integer.parseInt(countPeople1);
if (countPeople <= 1) {
System.out.println("Недостаточно человек");
} else if (countPeople >= 2) {
Copy link

@MagicUnderHood MagicUnderHood Aug 20, 2022

Choose a reason for hiding this comment

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

Здесь достаточно поставить просто else, без условия, потому что если в первую ветку if число не подходит, оно и будет >= 2, то есть тут условие всегда выполняется.

sum += price;
Product product = new Product(name, price);
goods.add(product);
System.out.println("Товар добавлен, добавить еще товар?");
Copy link

@MagicUnderHood MagicUnderHood Aug 20, 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

@MagicUnderHood MagicUnderHood MagicUnderHood 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 によって変換されたページ (->オリジナル) /