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 - Николаев#124

Closed
UltravioletDays wants to merge 7 commits intoYandex-Practicum:master from
UltravioletDays:master
Closed

Проектная работа No1 - Николаев #124
UltravioletDays wants to merge 7 commits intoYandex-Practicum:master from
UltravioletDays:master

Conversation

@UltravioletDays
Copy link

@UltravioletDays UltravioletDays commented Nov 11, 2022

No description provided.

@@ -0,0 +1,18 @@
public class Ending {

String end(float num) {
Copy link

@faritowich faritowich Nov 12, 2022

Choose a reason for hiding this comment

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

В Java, да и не только, принято называть методы глаголами.
Почитать можно здесь:
https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html

UltravioletDays reacted with heart emoji
} else {
System.out.println("Требуется указать числовое значение!");
}
}
Copy link

@faritowich faritowich Nov 12, 2022

Choose a reason for hiding this comment

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

Большое количество сплошного кода в одном методе очень затрудняет читаемость кода. Лучше разбивать код на логические блоки и выносить в отдельные методы или классы. Например, можно вынести весь код в циклах while(true), который отвечает за ввод количества гостей/ввод продуктов, в отдельные методы inputGuests, inputProducts.

UltravioletDays reacted with heart emoji
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 によって変換されたページ (->オリジナル) /