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

Проектная работа No1#1

Open
romanumberone wants to merge 1 commit intomain from
dev
Open

Проектная работа No1 #1
romanumberone wants to merge 1 commit intomain from
dev

Conversation

@romanumberone
Copy link
Owner

@romanumberone romanumberone commented Feb 17, 2026
edited
Loading

2PR, первая проектная работа.

Copy link

@ArturNurtdinov ArturNurtdinov left a comment

Choose a reason for hiding this comment

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

Хорошая работа, молодец!

Comment on lines +2 to +3
String brand;
int speed;
Copy link

@ArturNurtdinov ArturNurtdinov Feb 17, 2026

Choose a reason for hiding this comment

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

Поля лучше пометить final, тем самым исключив возможность их модификации извне

System.out.println("Введите скорость машины No" + i);
if (scanner.hasNextInt()) {
speed = scanner.nextInt();
if (speed >= 0 && speed <= 250) {
Copy link

@ArturNurtdinov ArturNurtdinov Feb 17, 2026

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

Reviewers

1 more reviewer

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