Question

Population growth – Object-oriented programming JAVA java programme It is possible to propose a discrete simulation...

Population growth – Object-oriented programming JAVA
java programme

It is possible to propose a discrete simulation of the growth of a rabbit population in the absence of predators. This supposes that we take into account the birth and death of rabbits. As for many biological models, we have incomplete or imprecise field data and we must take modeling choices. For instance here are some information we have for Garenne rabbits: females can give birth approximatively every month. Female are able to give 4 to 8 liters per year, but there is more chance to have 5,6 or 7 litters. For each litter you have 3 to 6 baby rabbits. A random drawing can determine if such baby rabbits are a males or females; the natural probability being approximatively around 50%. Decide your probabilities. Sexual maturity is reached between 5 to 8 months after the birth of baby rabbits. We can also simulate the probability of death according to the rabbit age, this can be given by proposing simple rules about survival. For adults (rabbits at sexual maturity), the survival rate is 50%, for little rabbits it is only 20%. When a rabbit reaches 11 years old, its survival rate is diminished by 10% every year, reaching 0% at 15 years old (meaning death at 15 years old). This model is more realistic than a Fibonnaci growth, it can be simulated with the input parameters and probability laws that you will decide. You can find more realistic values using the Internet or Wikipaedia depending on the rabbit species.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
import java.util.Scanner;
02 public class Population
03 {
04 public static void main(String[] args)
05 {
06 //Declarations
07 double percentage = .02f;
08
09 int population;
10
11
12 String county;
13 String response;
14
15
16 double years;
17
18
19 Scanner input = new Scanner(System.in);
20 while(true){
21 System.out.println("What is your county? ");
22 county = input.next();
23
24 System.out.println("What is your population size? ");
25 population = input.nextInt();
26
27
28
29 for(int i = 0; i < 20; ++i){
30 years = population * percentage;
31 System.out.printf("After %d years the population is is %.2f%n", (i + 1),years);
32
33 }
34 System.out.println("Do you want to see another record? Type Y or N...");
35 response = input.next();
36 if(response.equals("N")) break;
37 }
38 System.out.println("Population never expected to double. ");
39
40
41 }
42 }
Add a comment
Know the answer?
Add Answer to:
Population growth – Object-oriented programming JAVA java programme It is possible to propose a discrete simulation...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Objectives Make the transition to object oriented programming. Go over some of the basics concepts: Classes...

    Objectives Make the transition to object oriented programming. Go over some of the basics concepts: Classes Instance variables Methods Object state The keyword "this", what it does toString method Introduction Phase 1 Review the following Java programs as an example of a Java class and client code that uses it: MimicOct.java and UnderTheSea.java. All of you have been working with classes in Java. One of the most important things to know about classes is that they are actually blueprints for objects. They basically...

  • java Object Oriented Programming The assignment can be done individually or in teams of two. Submit one as...

    java Object Oriented Programming The assignment can be done individually or in teams of two. Submit one assignment per team of two via Omnivox and NOT MIO.Assignments sent via MIO will be deducted marks. Assignments must be done alone or in groups and collaboration between individuals or groups is strictly forbidden. There will be a in class demo on June 1 make sure you are prepared, a doodle will be created to pick your timeslot. If you submit late, there...

  • Prenatal Screening test Prenatal screening is a non-invasive type of testing that is available to all...

    Prenatal Screening test Prenatal screening is a non-invasive type of testing that is available to all pregnant individuals in Ontario. Non-invasive means that there is no risk to the pregnant person or the baby. Screening uses ultrasound, blood work or some combination of both to get information about the likelihood of a baby having a specific health condition. Screening tests do not tell you for sure if the baby has the condition, only what the chance is. A physician will...

  • Prenatal Screening test Prenatal screening is a non-invasive type of testing that is available to all pregnant indivi...

    Prenatal Screening test Prenatal screening is a non-invasive type of testing that is available to all pregnant individuals in Ontario. Non-invasive means that there is no risk to the pregnant person or the baby. Screening uses ultrasound, blood work or some combination of both to get information about the likelihood of a baby having a specific health condition. Screening tests do not tell you for sure if the baby has the condition, only what the chance is. A physician will...

  • NEED SOLUTION FOR THIS PROJECT STEP BY STEP WITH DETAILS. AS EARLY AS POSSIBLE. Linear Algebra...

    NEED SOLUTION FOR THIS PROJECT STEP BY STEP WITH DETAILS. AS EARLY AS POSSIBLE. Linear Algebra Project : Urban Population Dynamics * This project is about population modeling and how linear algebra tools may be used to study it. Background Population modeling is useful from different perpectives : 1. planners at the city, state, and national level who look at human populations and need forecasts of populations in order to do planning for future needs. These future needs include housing,...

  • Please answer as many as possible!! QUESTION 10 As the hydrogen ion [H +] concentration in...

    Please answer as many as possible!! QUESTION 10 As the hydrogen ion [H +] concentration in a solution decreases, the hydroxide ion [OH -] concentration increases and the pH increases. decreases and the pH increases. increases and the pH decreases. decreases and the pH stays the same. decreases and the pH decreases. 1 points    QUESTION 11 Environmental science is a theoretical approach in interpreting the environment. way to see the world in scientific terms. narrowly defined set of physical,...

  • My Study on Sickle Cell Anemia Research In 500 words, answer the following questions 1.Select your...

    My Study on Sickle Cell Anemia Research In 500 words, answer the following questions 1.Select your study sample 2. How have you selected your sample? 3. How will you select your sample population and give the rationale behind your decision Please type the solution on the keyboard so that I can copy and paste Q. No 1. Answer : Sickle cell disease : It is defined as it is a chronic heriditory form of Anemia, in which the red blood...

  • 14. Select the number of participants in the Beck & Watson study Group of answer choices...

    14. Select the number of participants in the Beck & Watson study Group of answer choices 8 13 22 35 15. Beck & Watson determined their final sample size via Group of answer choices coding saturation triangulation ethnography 16.Through their study, Beck & Watson determined Group of answer choices after a traumatic birth, subsequent births have no troubling effects after a traumatic birth, subsequent births brought fear, terror, anxiety, and dread Subsequent Childbirth After a Previous Traumatic Birth Beck, Cheryl...

  • GE case study, Scenario - Case Study on General Electric (GE) by Jeffrey R. Immelt (Article...

    GE case study, Scenario - Case Study on General Electric (GE) by Jeffrey R. Immelt (Article adapted from Harvard Business Review) A CEO has different tasks in different cycles. Some CEOs are founders and builders. Others have the luxury of managing momentum through a stable economy or a period when business models aren’t being disrupted. My task was different: remaking a historic and iconic company during an extremely volatile time. I led a team of 300,000 people for 6,000 days....

  • 10. The Beck & Watson article is a Group of answer choices quantitative study qualitative study...

    10. The Beck & Watson article is a Group of answer choices quantitative study qualitative study 11. Beck & Watson examined participants' experiences and perceptions using what type of research design? Group of answer choices particpant obersvation phenomenology 12. Select the participants in the Beck & Watson study Group of answer choices Caucasian women with 2-4 children Caucasian pregnant women 13. In the Beck & Watson study, data was collected via a(n) Group of answer choices internet study focus group...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT