Hi team,
I have really tried to find the concern in this task. I have already dedicated 210 mins for this task. Still not able to find the concerns with task.
could you please help your expertise to know the issue in the code.
issue: Below methods call do not show any output. so weird to me, I am not able to find a single concern.
hen.getMonthlyEggCount();
hen.getDescription();
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();
// System.out.println("amirunning");
System.out.println(hen);
hen.getDescription();
}
static class HenFactory {
static Hen getHen(String continent) {
Hen hen = null;
if(continent.equals("Europe")){
hen = new EuropeanHen();
}
else if (continent.equals("North America")){
hen = new NorthAmericanHen();
}
else if(continent.equals("Asia")){
hen = new AsianHen();
}
else if(continent.equals("Africa")){
hen = new AfricanHen();
}
return hen;
}
}
}