Object Oriented Programming

Platypus 3


We know that platypuses can lay up to three eggs each season. Starting with the most basic assumption that each number of eggs is equally likely (including zero), model the reproductive dynamics of a group of three platypuses.

Create three Platypus objects, choosing a name and an initial number of eggs for a season for each. Simulate 10 seasons worth of egg laying. For each season for each platypus, randomly choose a number of eggs from zero to three and add it to the list of the number of eggs laid. Once the simulation is finished print out the name, total fecundity, and number of breeding seasons for each platypus based on the following example:

Billy laid a total of 10 eggs in 5 successful breeding seasons.