CodeGym /Courses /Java Core /Bonus task | Lesson 6 | Level 4

Bonus task | Lesson 6 | Level 4

Java Core
Level 4 , Lesson 6
Available

"What? You figured that out already?! You can't just go and complete all my tasks. It seems to me that you're just fooling around. Here's a new task for you. It's very difficult. Pay attention and arrange everything systematically. Read the literature, and ask your friends! Nobody dares deceive the Great Diego!"

16
Task
Java Core, level 4, lesson 6
Locked
Chicken factory
Chicken factory
Comments (70)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
15 September 2025
Don't try to be funny like me by, say, making North American hens lay a negative number of eggs. You'll fail one of the steps if you do so.
Vazhiko Level 24
18 February 2025
Well, it wasn't tough at all, I must say. But it was a bit of a pity that 2 out of my 4 total attempts failed 'cause the compiler couldn't process the enhanced switch statement.
O H Level 32, Germany, Germany
3 January 2025
For me it was easy, but im doing it on my phone, so i have hints. It took 2 attempts tho bcuz i accidentally mixed the Continent and String types
Stas Orehov Level 22, United Kingdom, United Kingdom
12 December 2023
Good task. though i failed it many times because of lack of space: "I come from continent." instead of : " I come from continent." feel annoyed
Anton Level 47, Poznan, Poland
8 April 2025
Same type🤡
Untitled by Anon Level 49, Germany
4 May 2023
Great task. I failed the first attempted because I wrote "I lay n eggs per month" vs. "I lay n eggs a month".
Krzysiek Nowak Level 33, Poland, Poland
26 April 2023
why switch method introduced in Java 14 is not accepted in the solution?
Rene Level 28, Netherlands
14 May 2024
I had same issue and switched (no pun intended) to the if-else to get it accepted. It ran fine with switch statement in IntelliJ. Heck, IntelliJ even suggested to change my if-else into switch.
manny9876 Level 36, Israel
14 February 2023
Thank goodness for the " correct solution" button!
Tasmoda Level 28, Midrand, South Africa
10 June 2022
I enjoyed analysing this problem.👌
Jcode Level 27, United Kingdom
6 April 2022
Great task, although watch out, the verification even checks the return string. Spot the difference... "I am a chicken" "I am a chicken."
whoseunassailable Level 28, India, India
2 March 2022
the task seemed easy for me. The place where i had to give up on it is i never thought about using the switch statement instead made different variables hen, hen2, hen3 & hen4 and then assigned them different hentypes. Is there a way by which we can solve it not using the switch statements.
whoseunassailable Level 28, India, India
2 March 2022
ohhh anyways i realised that i can use the if condition.So nvm.