This is a Computer Science Question and I need to figure out how write a program that will solve this answer and Its required that I use Java to answer this quesion I used Eclipse but Im struggling to run this program   The U.S. Census Bureau projects population based on the following assumptions:- One birth every 7 seconds- One death every 13 seconds- One new immigrant every 45 secondsWrite a program to display the population for each of the next five years. Assume the current population is 312,032,486 and one year has 365 days.Hint: In Java, if two integers perform division, the result is an integer. The fractional part is truncated. For example, 5 / 4 is 1 (not 1.25) and 10 / 4 is 2 (not 2.5). To get an accurate result with the fractional part, one of the values involved in the division must be a number with a decimal point. For example, 5.0 / 4 is 1.25 and 10 / 4.0 is 2.5.Sample RunPopulation after 1 year: 3.148125827032967E8Population after 2 years: 3.1759267940659344E8Population after 3 years: 3.2037277610989016E8Population after 4 years: 3.2315287281318676E8Population after 5 years: 3.259329695164835E8Class Name: Exercise01_11   public class Exercise01_11 public static void main(String [] args) {

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter3: Input/output
Section: Chapter Questions
Problem 4PE: 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and...
icon
Related questions
Question

This is a Computer Science Question and I need to figure out how write a program that will solve this answer and Its required that I use Java to answer this quesion I used Eclipse but Im struggling to run this program

 

The U.S. Census Bureau projects population based on the following assumptions:

- One birth every 7 seconds
- One death every 13 seconds
- One new immigrant every 45 seconds

Write a program to display the population for each of the next five years. Assume the current population is 312,032,486 and one year has 365 days.

Hint: In Java, if two integers perform division, the result is an integer. The fractional part is truncated. For example, 5 / 4 is 1 (not 1.25) and 10 / 4 is 2 (not 2.5). To get an accurate result with the fractional part, one of the values involved in the division must be a number with a decimal point. For example, 5.0 / 4 is 1.25 and 10 / 4.0 is 2.5.

Sample Run

Population after 1 year: 3.148125827032967E8
Population after 2 years: 3.1759267940659344E8
Population after 3 years: 3.2037277610989016E8
Population after 4 years: 3.2315287281318676E8
Population after 5 years: 3.259329695164835E8

Class Name: Exercise01_11

 

public class Exercise01_11

public static void main(String [] args) {

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT