Implement the critter class. Each critter C has attributes species, size, and age. • The constructor accepts arguments for the attributes above, in the order above. You can expect size and age to be...


Implement the critter class.<br>Each critter C has attributes species, size, and age.<br>• The constructor accepts arguments for the attributes above, in the order above.<br>You can expect size and age to be numeric values.<br>Each critter C has a can_eat () method, which:<br>Receives one argument, prey, which you can expect to be another Critter object.<br>Compares prey 's size against C's.<br>o If C is larger than prey, return True. Otherwise, return False.<br>Each critter C also has a survive_year () method, which:<br>• Increases C's size and age by 1, respectively, and returns C's current size.<br>

Extracted text: Implement the critter class. Each critter C has attributes species, size, and age. • The constructor accepts arguments for the attributes above, in the order above. You can expect size and age to be numeric values. Each critter C has a can_eat () method, which: Receives one argument, prey, which you can expect to be another Critter object. Compares prey 's size against C's. o If C is larger than prey, return True. Otherwise, return False. Each critter C also has a survive_year () method, which: • Increases C's size and age by 1, respectively, and returns C's current size.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here