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

Dev#2

Open
ValentinPside wants to merge 2 commits intomain from
dev
Open

Dev #2
ValentinPside wants to merge 2 commits intomain from
dev

Conversation

@ValentinPside
Copy link
Owner

@ValentinPside ValentinPside commented Dec 28, 2022

  1. Добавлены методы hasNextInt и hasNextDouble при проверки введённых в консоль данных;
  2. Дублирующиеся проверки в классе Calculator выведены в отдельный метод;
  3. Расчёт окончания в классе Calculator проводится по новому алгоритму в отдельном методе;

}

public void setName() {
Scanner scanner = new Scanner(System.in);
Copy link

@gusar-off gusar-off Dec 29, 2022

Choose a reason for hiding this comment

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

Лучшее переиспользовать инстанс Scanner, а не создавать каждый раз новый.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

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