Tasks 1. Develop a main menu for the program. The options on the main menu should be: • Set the Generation 0 values • Display the Generation 0 values • Run the model • Export data • Quit. 2. Develop the part of the program that allows the user to set the Generation 0 values for the: • population numbers of juveniles, adults and seniles • survival rates for juveniles, adults and seniles • birth rate • number of new generations to model. This should be between 5 and 25. The program should then return to the menu. 3. Develop the part of the program that will display the Generation 0 values for juveniles, adults and seniles, the birth rate and the survival rates. The program should then return to the menu. 4. Develop the part of the program that runs the model, displaying the number of juveniles, adults and seniles and the total population size for each generation from 0 to the number of new generations entered. The program should then return to the menu. 5. The model needs an export feature to save the data so that it can be used in another application (such as a spreadsheet package). Develop your program so that when the user chooses to export the data:
- a) They are asked to enter a suitable filename b) The program should check whether a file of the same name already exists. c) If the file does not already exist, then the data are saved. d) If the file does already exist, the user should be asked whether they want to overwrite the existing file. e) If they choose to overwrite the existing file, then the data are saved. f) If they choose not to overwrite the existing file, then they should be returned to step a. After this option has been completed, the program should return to the menu
- In a real population, if the total population becomes too high, the survival rates will decrease because of disease.
When the total population size reaches a disease trigger point, disease will take effect. When the total population size falls below this trigger point, disease will have no effect
The effect of disease is unpredictable. To simulate this effect a disease factor is applied to the survival rates of juveniles and seniles. • The disease factor is represented by a random percentage between 20% and 50%. • To calculate the new number of juveniles and seniles in the next generation, the following formula is used: New number of individuals = Current number of individuals * survival rate * disease factor Extend your menu from Task 1 to include an option to enter the total population disease trigger point. Extend your program to allow for the effect of disease in calculating the population sizes. Disease will reduce the survival rates of juveniles and seniles only