Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this in Java programming language. please include the comments for steps please. You have been hired by the Everglades National Park to develop

I need this in Java programming language. please include the comments for steps please.

You have been hired by the Everglades National Park to develop a program that will estimate how many eggs a female python will lay over the course of a lifetime. The user will be asked to enter the age of the python, and you should validate the age with a while loop to ensure that the age falls between 1 and 20. You will calculate how many years that the python is expected to breed using an estimate of 20 years as the average lifetime of the python and a breeding age beginning at 4 years. If you process a python that is 4 years old or less, the output should show results for year 4 to year 20 meaning that even if the python is 2 years old, your results will count only from 4 to 20 years of age. If the python is more than 4 years old, the output should show results for the python from its current age forward to its 20" year meaning that if the python is 10, the output will count from year 10 to year 20. A while or for loop must be used to calculate and display the sum of the eggs that the python will lay each year during the breeding lifecycle and sum of all eggs that the python has laid as of the end of each year. You must also sum the eggs for all pythons processed and display that sum after the program ends.

Below is the output for the program when running with test data. Input data is shown in red and italicized.

This is the Python Snake Eggstimator Program.

It estimates the number of eggs that a female python will produce over a lifetime. Please enter HISS if you want run the program or STOP to quit.

Please enter HISS if you want run the program or STOP to quit.

hiss

Enter the Python ID. neverglades2

Year

Previous Year Eggs Current Year

Eggs

Sum of all Eggs

5

0

35

35

6

35

35

70

7

70

35

105

8

105

35

140

9

140

35

175

10

175

35

210

11

210

35

245

12

245

35

280

13

280

35

315

14

315

35

350

15

350

35

385

16

385

35

420

17

420

35

455

18

455

35

490

19

490

35

525

20

525

35

560

Enter the age of the python in years.

neverglades2 will lay a total of 560 eggs over her remaining lifetime of 20 years. Please enter HISS if you want run the program or STOP to quit.

Can you please also includes comments explaining the steps thank you

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions

Question

4. What are the current trends in computer software platforms?

Answered: 1 week ago