79658443

Date: 2025-06-09 06:44:38
Score: 2.5
Natty:
Report link

You should take a parameter in Eat() function which will be the food as you are calling pets[0].Eat()... without an argument. In your switch case, pass string food in Eat() and then compare to favfood and then do the hungry functionality.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Arwa Abbas