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

FamilyTreeHomeWork #1180

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

FamilyTreeHomeWork #1180

wants to merge 7 commits into from

Conversation

MargoPruss
Copy link

No description provided.

}

public void sortByAge(){
Collections.sort(humans, new ComparatorByAge());
Copy link
Owner

Choose a reason for hiding this comment

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

при создании объектов обобщенного типа стоит добавлять угловые скобочки

public boolean addChild(int parentId, int childId){
return service.addChild(parentId, childId);
}

Copy link
Owner

Choose a reason for hiding this comment

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

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

private int idHuman;
private FamilyTree<Human> tree;
private HumanBuilder humanBuilder;
FileHandler fileHandler;
Copy link
Owner

Choose a reason for hiding this comment

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

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

import family_tree.model.human.Human;

public class FileManager {
private FileHandler fileHandler;
Copy link
Owner

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