Skip to content

первый Pull Request - #123

Closed
niketch1 wants to merge 3 commits into
Yandex-Practicum:mainfrom
niketch1:master
Closed

niketch1 wants to merge 3 commits into
Yandex-Practicum:mainfrom
niketch1:master

Conversation

@niketch1

@niketch1 niketch1 commented Nov 8, 2022

Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/Main.java
Comment on lines +19 to +25
if (numberOfPersons > 1) {
break;
} else if (numberOfPersons == 1) {
System.out.println("Вы один, счёт делить не нужно)");
} else {
System.out.println("Некорректное значение");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Можно заменить на switch case, что бы сделать код более читаемым

Comment thread src/main/java/Main.java
if(scanner.hasNextDouble()) {
price = scanner.nextDouble();
if(price >= 0) {
Product UserInput = new Product(name, price);

Copy link
Copy Markdown

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.

3 participants