Hey guys, I tried to move spaces, dots and all the stuff and still have an error, please advice me about what is wrong in that mass that i call "my code" :D Thanks in advance.
package pl.codegym.task.task14.task1408;
/*
Ferma drobiu
*/
public class Solution {
public static void main(String[] args) {
Hen hen = HenFactory.getHen(Continent.AFRICA);
hen.getMonthlyEggCount();
System.out.println(hen.getDescription());
System.out.println(hen.getMonthlyEggCount());
}
static class HenFactory {
static Hen getHen(String continent) {
Hen hen = null;
if (continent==Continent.EUROPE){
return hen=new EuropeanHen();
}
else if (continent==Continent.NORTHAMERICA){
return hen=new NorthAmericanHen();
}
else if (continent==Continent.AFRICA){
return hen=new AfricanHen();
}
else if (continent==Continent.ASIA){
return hen=new AsianHen();
}
return hen;
}
}
}