Skip to content

первый комит - #1

Open
AlexV1111 wants to merge 2 commits into
mainfrom
dev
Open

AlexV1111 wants to merge 2 commits into
mainfrom
dev

Conversation

@AlexV1111

Copy link
Copy Markdown
Owner

В задаче я не считал расстояние, которые проехали гонщики, потому что это не нужно было для выявления победителя (скорость у гонщиков постоянна на всей трассе).

Comment thread src/main/java/Main.java Outdated

String nameAuto;
int speedAuto;
Auto[] arrayAuto = new Auto[3];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

значение 3 используется 2 раза. Имеет смысл вынести в переменные или константы. Или же в цикле использовать длину массива

Comment thread src/main/java/Main.java Outdated
arrayAuto[i] = auto;
break;
} 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.

было бы здорово уточнить ошибку пользователя

Comment thread src/main/java/Main.java

for (int i = 0; i < 3; i++) {
System.out.println("Введите название машины №" + (i + 1) + ":");
nameAuto = scanner.next();

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.

2 participants