-
Notifications
You must be signed in to change notification settings - Fork 12
task1 is done #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
task1 is done #15
Conversation
|
|
||
| public void setName(String name) { | ||
| this.name = name; | ||
| } |
There was a problem hiding this comment.
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); | ||
| } |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Обработки исключения не хватает
Задача решена.