Question
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
|
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started