I can't understand what is wrong
package com.codegym.task.task07.task0724;
/*
Family census
*/
public class Solution {
public static void main(String[] args) {
// write your code here
Human ena = new Human("Niko",male, 66);
Human dyo = new Human("Eirhni", female, 66);
Human tria = new Human("Odysseas", male, 43);
Human tessera = new Human("Nina", female,37);
Human pente = new Human("Ilias", male, 33, ena, dyo);
Human eksi = new Human("Theodoris", male, 31, ena, dyo);
Human epta = new Human("Aristotelis", male,29,ena,dyo);
Human okto = new Human ("Dimitri", male, 14, tria, tessera);
Human ennea = new Human ("Sophia", female, 12, tria, tessera);
}
public static class Human {
// write your code here
String name;
boolean sex;
int age;
Human father;
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;
}
ena.toString();
dyo.toString();
tria.toString();
tessera.toString();
pente.toString();
eksi.toString();
epta.toString();
okto.toString();
ennea.toString();
public String toString() {
String text = "";
text += "Name: " + this.name;
text += ", sex: " + (this.sex ? "male" : "female");
text += ", age: " + this.age;
if (this.father != null)
text += ", father: " + this.father.name;
if (this.mother != null)
text += ", mother: " + this.mother.name;
return text;
}
}
}