Skip to content

Coletterbox/RabbitProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

148 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rabbit Project



Customer Requirements

Phase 1: Rabbits

The client has asked that the following requirements be implemented:

  • Each second will represent a month.
  • Breeding rabbits reach maturity at 3 months.
  • The programme will start with a single breeding pair.
  • If a male is available a female can be pregnant and give birth in one month.
  • Each breeding pair can create between 1-14 offspring that can be a random male or female.
  • A female that has given birth can breed again immediately after giving birth.
  • Rabbits die at 5 years.

Phase 2: Rabbits

The client has asked that the following requirements be implemented:

  • Female rabbits have a 50% chance of becoming pregnant.
  • If a male is allocated to a female, they cannot be allocated to another female for 1 month. After this time, they can be allocated to any other free female.

Phase 3: Foxes

The client has asked that the following requirements be implemented:

  • The simulator will also include foxes to affect the population of rabbits.
  • The program begins with a single male and female fox.
  • Foxes breed once a year.
  • A pregnant fox can have between 1-10 kits.
  • Females are able to breed after 10 months.
  • While rabbits are available, a single fox can eat up to 20 rabbits a month.
  • Your simulator should reports on the following after finishing the time period:     
    • Number of male rabbits alive.
    • Number of female rabbits alive.
    • Number of male foxes alive.
    • Number of female foxes alive.
    • Number of rabbits that have died (natural death and eaten).

User Guide

How to use the simulation:

  1. The user is prompted to enter the number of months for which they would like to run the simulation.
  2. The user is then asked whether they would like to view the information collected about the foxes and rabbits for each month or be given an overview for the total period of time.
  3. The user is then directed to the Simulation Results text file where they will be displayed information on the foxes and rabbits in the format that they chose.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages