Skip to content
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

Lesson_5 #1189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Lesson_5 #1189

wants to merge 2 commits into from

Conversation

RoughRav
Copy link

No description provided.

@RoughRav
Copy link
Author

Константин, добрый день
Никак не могу справитьсяя с ComparatorByName в классе FamilyTree
ComparatorByAge видит без проблем а ComparatorbyName не знаю что хочет

public FamilyTree<Human> getFamilyTree(){
return tree;
}

Copy link
Owner

Choose a reason for hiding this comment

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

добавьте методы сохранения и загрузки

@@ -0,0 +1,6 @@
package family_tree.view;
Copy link
Owner

Choose a reason for hiding this comment

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

Непонятно. Уточните свою работу с гитом. Так как в гите файл находится в пакете commands, а в файле написано, что пакет называется view.

Добавлены классы Parent, Child, Human
public class Presenter {
private View view;
private Service service;
private FileManager fileManager;
Copy link
Owner

Choose a reason for hiding this comment

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

сервисный класс должен управлять файловым менеджером, а не презентер

Copy link
Owner

Choose a reason for hiding this comment

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

Прямая зависимость нарушает пятый принцип солид


public void saveToFile() {
String filename;
String filePath = "src/model/writer/";
Copy link
Owner

Choose a reason for hiding this comment

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

Путь к файлу должен быть в FileHandler, а не во view

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