Skip to content

Прошу проверить ДЗ7 - #2

Open
Ekarry wants to merge 2 commits into
masterfrom
HWLesson_7
Open

Прошу проверить ДЗ7#2
Ekarry wants to merge 2 commits into
masterfrom
HWLesson_7

Conversation

@Ekarry

@Ekarry Ekarry commented Jun 10, 2021

Copy link
Copy Markdown
Owner

No description provided.




public static void main(String[] args) throws IOException {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

а почему это в main? мы же должны пользователю меню показать

} else {
throw new RuntimeException(GlobalState.getInstance().getSelectedCity()+" - такой город не найден\n");
}
} catch (RuntimeException | IOException | ParseException e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

дублирующие блоки кода говорят о том, что логику можно вынести в методы и переиспользовать их. Тут в блоке if-else почти весь код дублируется

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