вообще пишет что не может найти фазера (((
package com.javarush.task.task07.task0724;
/*
Семейная перепись
*/
public class Solution {
public static void main(String[] args) {
// напишите тут ваш код
Human bob=new Human("bob",true,16,father,mother);
Human bob1=new Human("bob",true,16,father,mother);
Human bob2=new Human("bob",true,16,father,mother);
Human father=new Human("bob",true,16,ded,babka1);
Human mother=new Human("bob",false,16,ded2,babka2);
Human ded1=new Human("bob",true,16);
Human ded2=new Human("bob",true,16);
Human babka1=new Human("bob",false,16);
Human babka2=new Human("bob",false,16);
System.out.println(ded1);
}
public static class Human {
// напишите тут ваш код
public String name;
public boolean sex;
public int age;
public Human father;
public Human mother;
public Human(String name,boolean sex,int age){
this.name =name;
this.sex =sex;
this.age =age;
}
public Human(String name,boolean sex,int age,Human father,Human mother){
this.name =name;
this.sex =sex;
this.age =age;
this.father=father;
this.mother=mother;
}
public String toString() {
String text = "";
text += "Имя: " + this.name;
text += ", пол: " + (this.sex ? "мужской" : "женский");
text += ", возраст: " + this.age;
if (this.father != null) {
text += ", отец: " + this.father.name;
}
if (this.mother != null) {
text += ", мать: " + this.mother.name;
}
return text;
}
}
}