Skip to content

task1 is done#15

Open
South12309 wants to merge 4 commits intoFAANG-School:masterfrom
South12309:task_1
Open

task1 is done#15
South12309 wants to merge 4 commits intoFAANG-School:masterfrom
South12309:task_1

Conversation

@South12309
Copy link
Copy Markdown

Задача решена.


public void setName(String name) {
this.name = name;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Если не используем, то можно и удалить в принципе

// timeMachine.traveInTime(timeTraveler2, 1999);
// timeMachine.traveInTime(timeTraveler3, 2101);
// timeMachine.traveInTime(timeTraveler1, 2100);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Отступ между методами

timeMachine.traveInTime(timeTraveler1, 2000);
// timeMachine.traveInTime(timeTraveler2, 1999);
// timeMachine.traveInTime(timeTraveler3, 2101);
// timeMachine.traveInTime(timeTraveler1, 2100);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Никогда не коммитим закомментированный код. Его всегда удаляем сразу

TimeTraveler timeTraveler2 = new TimeTraveler("Ivan2", 2000, 2090);
TimeTraveler timeTraveler3 = new TimeTraveler("Ivan3", 1995, 2100);
TimeMachine timeMachine = new TimeMachine();
timeMachine.isWorking=true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ctrl + alt + L в IDEA сделает автоформатирование

throw new TimeTravelException("Machine is not working");
}
if (year<timeTraveler.getBirthYear()) {
throw new TimeTravelException("Trave in year were traveler not birth");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Добавить контекст ошибки

TimeTraveler timeTraveler3 = new TimeTraveler("Ivan3", 1995, 2100);
TimeMachine timeMachine = new TimeMachine();
timeMachine.isWorking=true;
timeMachine.traveInTime(timeTraveler1, 2000);
Copy link
Copy Markdown
Contributor

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