Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA!!!!! Activity 6.1:Imagine All the People (10 pts) Worldwide population continues to grow every year [1]. One model for projecting the growth is given by
JAVA!!!!!
Activity 6.1:Imagine All the People (10 pts) Worldwide population continues to grow every year [1]. One model for projecting the growth is given by the equation population-7.35-e 0.0071 (Year-2016) which reports the results in billions. . The letter e in the above formula is the mathematical symbol for Euler's number, the base of the natural logarithms. To calculate this exponent in Java, you will need to use the Math.exp() method from java.lang.Math Add a block comment at the top of your program with your name and section information * @author first name last name * Section info Write a program that requests a year from a user and displays the estimated population for that year as shown in the Example Run below. Create a new Scanner variable at the top of your program, named input. Prompt the user to enter the year for which they wish to calculate the world population . You must name the source code file PopGrowth.java . Then, declare a new integer variable called year. Calculate the population for the year using the formula for population shown above. . Use the Math.exp( method from java.lang.Math to calculate the power of e (Euler's number) Example Run: The outputs of the program must look like the following for you to receive full credit. For the input shown (2020) you must get the same output. However, the output numbers must change if the inputs are different. Enter the year: 2020 Estimated worldwide population in 2020: 7.561732368586969 billion Use the default formatting and precision for the numbers do NOT add any numerical formatting statements to the code
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