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

Спринт 2 задание by Алексей Паничев#1

Open
AlexPanic wants to merge 4 commits intomain from
dev
Open

Спринт 2 задание by Алексей Паничев #1
AlexPanic wants to merge 4 commits intomain from
dev

Conversation

@AlexPanic
Copy link
Owner

@AlexPanic AlexPanic commented Jun 28, 2023
edited
Loading

попытка 2

}
this.addItem(item);
return 1;
}
Copy link

@faritowich faritowich Jun 28, 2023

Choose a reason for hiding this comment

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

Лучшей практикой будет выносить такие коды (1, -1, 0) в константы при помощи final. Так будет понятно из названия константы, что она обозначает, можно будет отслеживать, где данная константа ещё используется, просто кликнув ctrl+click по объявленной константе. А то сейчас сходу не понятно, что означают эти числовые коды
Плюс если кодовое число используется не в одном месте, как сейчас, то не будет риска поменять в одном месте и забыть в другом

AlexPanic reacted with thumbs up emoji
}
}

String getWordForm(double sum, String f1, String f2, String f5) {
Copy link

@faritowich faritowich Jun 28, 2023

Choose a reason for hiding this comment

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

  1. Если планируем использовать только в данном классе, стоит сделать private
  2. Лучше давать аргументам более очевидные названия. Из названия f1, f2, f3 непонятно, что они означают

AlexPanic reacted with thumbs up emoji
} else {
people = peopleIn;
return true;
}
Copy link

@faritowich faritowich Jun 28, 2023

Choose a reason for hiding this comment

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

Не совсем понятно, почему вся логика по обработка ввода, выводу результата, склонении окончаний находится в одном общем класса, а логика по обработке ввода людей - в Main. Некритично, но можно также вынести

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