Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a PopulationCalculator.java class file this will contain your main method and all the code. Get Positive number input for this program we neeed to

Make a PopulationCalculator.java class file this will contain your main method and all the code. Get Positive number input for this program we neeed to get three(3) input values. These all need to be positive numbers so you should use a while loop to check user input. Starting number of organisms(whole number), Average daily increase(get it as a percentage and will convert to the decimal), Number of days to calculatre population growth(whole number). Then, Calculate the population growth: Loop through the numbers of days based on user input. Within the loop you should add to the population the growth * population. Also remember that the population is a percentage so you need to convert it to it's decimal form. The program should calculate for each day AND print out the population rounded to 4 decimals. Use NumberFormat objects to help you here. Loop the Program: Make the program loop when the user enters in "y" or "Y".

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

MFDBS 91 3rd Symposium On Mathematical Fundamentals Of Database And Knowledge Base Systems Rostock Germany May 6 9 1991

Authors: Bernhard Thalheim ,Janos Demetrovics ,Hans-Detlef Gerhardt

1991st Edition

3540540091, 978-3540540090

More Books

Students also viewed these Databases questions