Hi guys I need help with my Code.Unfortunately it's unable to pass verification check but when i run with intellij IDE i get the exact output required.
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;
//write your code here
if(continent.equals("Africa"))
hen = new AfricanHen();
else if(continent.equals("Asia"))
hen = new AsianHen();
else if(continent.equals("North America"))
hen = new NorthAmericanHen();
else if(continent.equals("Europe"))
hen = new EuropeanHen();
return hen;
}
}
}