I spent 10 min in writing the code and then after 90 minutes or so to just remove this getDescription() error but its not going. Please help.
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();
hen.getDescription();
}
static class HenFactory {
static Hen getHen(String continent) {
Hen hen = null;
//write your code here
if(continent.equals(Continent.NORTHAMERICA)){
hen = new NorthAmericanHen();
}
else if(continent.equals(Continent.EUROPE)){
hen = new EuropeanHen();
}
else if(continent.equals(Continent.AFRICA)){
hen = new AfricanHen();
}
else if(continent.equals(Continent.ASIA)){
hen = new AsianHen();
}
return hen;
}
}
}