Skip to content

main#1

Open
Tr1ad0s wants to merge 1 commit intomainfrom
dev
Open

main#1
Tr1ad0s wants to merge 1 commit intomainfrom
dev

Conversation

@Tr1ad0s
Copy link
Copy Markdown
Owner

@Tr1ad0s Tr1ad0s commented Jan 12, 2025

No description provided.

String nameCar = scanner.next();

int speed = -1;
while (speed < 0 || speed > 250) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Здесь лучше так же давать сообщение об ошибке, чтобы пользователь сразу понимал что пошло не так

String leader = "";
int distansLeader = 0;

public void whoLeader(Car Car) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Больше подошло бы название addNewCar или что-то в таком духе

Comment on lines +66 to +67
String leader = "";
int distansLeader = 0;
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