Skip to content

main - #1

Open
Tr1ad0s wants to merge 1 commit into
mainfrom
dev
Open

Tr1ad0s wants to merge 1 commit into
mainfrom
dev

Conversation

@Tr1ad0s

@Tr1ad0s Tr1ad0s commented Jan 12, 2025

Copy link
Copy Markdown
Owner

No description provided.

Comment thread src/main/java/Main.java
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.

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

Comment thread src/main/java/Main.java
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 thread src/main/java/Main.java
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