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

Моя работа#1

Open
AnastassiyaFom wants to merge 1 commit intomain from
dev
Open

Моя работа #1
AnastassiyaFom wants to merge 1 commit intomain from
dev

Conversation

@AnastassiyaFom
Copy link
Owner

@AnastassiyaFom AnastassiyaFom commented Jan 9, 2025

Выполнение Практической работы No1, Анастасия Фом

autos = racersInput(racerQuantity);
Auto leader = new Auto();
leader = findLeader();
System.out.println("Лидер этой гонки проедет "+ leader.speed*24+" км и это:");
Copy link

@DmitrijEgorow DmitrijEgorow Jan 11, 2025

Choose a reason for hiding this comment

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

Перед коммитом стоит приводить файлы к правильному стилю, так как код будут смотреть другие разработчики. В idea это легко делать путём вызова горячей комбинации клавиш (она зависит от ОС), её можно посмотреть в меню Code → Reformat Code

Comment on lines +22 to +26
Scanner scanner = new Scanner(System.in);
this.name = scanner.nextLine();
}
private void speedInput(){
Scanner scanner = new Scanner(System.in);
Copy link

@DmitrijEgorow DmitrijEgorow Jan 11, 2025

Choose a reason for hiding this comment

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

Можно не создавать каждый раз сканер на очередной новый ввод

AnastassiyaFom reacted with thumbs up emoji
Copy link
Owner Author

@AnastassiyaFom AnastassiyaFom Jan 11, 2025

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

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