I am working this in the code editor. It shows no output. I cant determine where my error is. I will try to use IntelliJ when I get home. However, if you know or can tell what did wrong please inform. Mike
package com.codegym.task.task14.task1408;
/*
Chicken factory
*/
public class Solution {
public static void main(String[] args) {
Hen hen = HenFactory.getHen(Continent.AFRICA);
hen.getMonthlyEggCount();
}
static class HenFactory {
static Hen getHen(String continent) {
Hen hen = null;
if(continent.equalsIgnoreCase("northamerica"))
hen= new NorthAmericanHen();
else if(continent.equalsIgnoreCase("europe")){
hen= new EuropeanHen();
}
else if(continent.equalsIgnoreCase("asia")){
hen= new AfricanHen();
}
else if(continent.equalsIgnoreCase("africa")){
hen= new AfricanHen();
}
return hen;
}
}
}