I've been trying all kinds of combinations from other posts for over 30 minutes now and still can't get it to verify. This is a poorly written exercise.
Tried with/without a space after super.getDescription().
Tried hardcoding the country and using Contintent.<country name>; tried with NorthAmerica and North America hardcoded.
Tried this.getMonthlyEggCount() and without the this keyword.
Can someone please just copy and paste exactly what they have for one of their Hen subclass getDescription() that verified correctly?
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 AsianHen();
} else if (continent.equalsIgnoreCase("africa")) {
hen = new AfricanHen();
}
return hen;
}
}
}