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) {

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 Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Write a program that reads a list of integers, and outputs whether the list contains all even number...

A: A C++ program that reads a list of integers, and outputs whether the list contains all even numbers,...

Q: Virtualization ________ the criticality of each physical server.     a. Decreases     b. Doe...

A: Virtualization: Virtualization is the development of a virtual version of something like an operatin...

Q: What factors are pushing interest in Virtual Desktop Integration technology?

A: Virtual desktop integration  is the method of running a desktop operating system that runs on a cent...

Q: How would merging mobile central office functions and landline central office function into CORD dat...

A: Central office functions:Landline central office functions route the calls between the providers, co...

Q: What are unformatted input and output statements?Explain with help of the example?

A: Unformatted input output does not have any format to input or output data. The unformatted input/ ou...

Q: Which of the following is an on-premise IDS system provided by Microsoft that helps protect your org...

A: An on-premise IDS system provided by Microsoft for protecting organizationAdvanced Threat Analytics ...

Q: Write a C++ program You are burning some music CDs for a party. You've arranged a list of songs in t...

A: Following is the C++ program:Header file are declared.Main function is defined.Declare necessary var...

Q: 1. The document must have a paragraph of at least 10 lines of text that describe you. This paragraph...

A: Note: As per our honor code, we only answer a question at a time. Please post the second question ag...

Q: Considertwodifferentimplementationsofthesameinstruction set architecture. The instructions can be di...

A: Processor P1:Given:

Q: C++ please

A: Program Instructions:Create function NumOfNodesDivisibleBy3() that takes the root node and returns t...

Q: Please answer as soon as posibble.

A: The code given below is written in Python programming language.The output of the code is arg1: john,...

Q: - For all the employees supervised by KING, give them a salary increase, which is equal to the 2% of...

A: Programming Instructions:Create two database tables ‘EMP’ and ‘DEPT’ and declare all required attrib...

Q: You are burning some music CDs for a party. You've arranged a list of songs in the order in which yo...

A: Note: The below program is written for CD which holds 80 minutes of music.

Q: 13.5 (Enable GeometricObject comparable) Modify the GeometricObject class to implement the Comparabl...

A: Unified Modeling Language (UML) class diagram:

Q: 1. Create a file that contains 20 integers or download the attached file twenty-integers.txttwenty-i...

A: The C++ program and approach are given below:Approach: -Declaring the essential headers.Declaring th...

Q: This program in python that requires two functions. In the main function: create an empty list. use...

A: Program Instructions:Import random module and use randint() function to generate random numbers.Use ...

Q: What are looping control structures in c? Explain with the help of program?

A: In a program, Loop control structure is used to execute a block of code a finite number of times unt...

Q: In databases, what are the benefits and negatives of using logical views to join tables together? Wh...

A: Click to see the answer

Q: Create a query that uses any THREE of the tables (SCHOOL, DEPARTMENT, PROFESSOR, TECHNOLOGY & CO...

A: Here,we have to create all the three tables required for the question-For Department-create table DE...

Q: What output does it produce? int funA(int x); void funB(int x); int main() { int a,b,c; a = 5; funB(...

A:  Program explanation-First, the main function will execute then funB(a) will call void funB (int n) ...

Q: When calling a swap function to swap the value of the two arrays, how do I add the reference to the ...

A: Program:#include <iostream>#include <string.h>#include <stdlib.h> using namespace ...

Q: In c++ i have a .dat file tha contains the following 123-45-6789 Kirk James 44.7 88.99 0.0175 124-89...

A: Overtime is calculated when working hours are more than 40. For each extra hour, the overtime pay is...

Q: - Find the total amount of money needed in order to give 5% salary increase to all mangers and 4% in...

A: To execute the given query first create a database with the required fields.Create table syntax is:C...

Q: Design an Essay class that is derived from the GradedActivity class:class GradedActivity{private:dou...

A: Program:#include <iostream> using namespace std; class GradedActivity{ private: double score; ...

Q: A Python program imports the random module. Write one Python statement in this program to assign a r...

A: Program approach- Import random module which is used to make random numbersUse a randint () which re...

Q: For each subnet assign a private IP address (of the form a.b.c.d/y) such that:• The IP range is cont...

A: Part (A): Subnet NameAddress 110.5.73.32210.0.0.0310.4.0.0410.5.64.0510.5.73.0610.5.72.0710.5.0.0810...

Q: What are different inbuilt string functions?

A: The programming language C/C++ has many predefine inbuild string function that requires to include s...

Q: Explain at least two risks associated with implementing an enterprise resource planning system. How ...

A: The enterprise resource planning (ERP) system helps to manages business process. The ERP based syste...

Q: Describe the difference in a signed and unsigned binary representation?

A: Difference between signed and unsigned binary numbers:

Q: Lottery Ticket Challange- Python Coding I have coded... import random#listspick=[]rand_ticket=[]#var...

A: Programming Instructions:Create a python program and declare the required counter variables ‘count3’...

Q: What is the Big-Oh Runtime (in terms of n) for the following segment of code?   int i; int used[n]; ...

A: Generally, we define the complexity of any code by using Big O- Notation. The complexity depends upo...

Q: Create a complex query based on two or more tables (SCHOOL, DEPARTMENT, PROFESSOR, TECHNOLOGY, COURS...

A: Create three tables for the given question-For School-create table SCHOOL(SCHOOL_CODE varchar(100),D...

Q: What is the "WHERE statment" in the query attached?

A: Difference between where and having clause:Both WHERE and HAVING clauses are used to filter the data...

Q: Create a class of students that should contain fields like rollno,name,subject and marks?

A: Programming language assumed is C++:Class:A C++ class is the building block, which contributes to th...

Q: when is it apporiate to use object oriented design? when is it apporiate to use sturctured design? a...

A: Object-oriented design: As the name suggests, the programming uses objects. The goal of object-orien...

Q: Write a method called listFilter() that takes in a list of strings, and returns a list containing on...

A: Method://Method definitionpublic List<String> listFilter(List<String> list){//Create a n...

Q: What are the problems caused due to the waterfall nature of the systems development life cycle?

A: Waterfall Model:Waterfall Model is a very first process model, and it is also known as the linear-se...

Q: - Find all responses that have words sound like makro

A: Create a table and name it as EMP.Syntax to create a table –CREATE TABLE table_name (    column1 dat...

Q: I need to solve this in C++ code  When analyzing data sets, such as data for human heights or for hu...

A: A C++ program for the given criteria is as follows,//Declare header files#include <iostream>#i...

Q: Convert the following binary numbers to decimal. Show your work. 1010011.101

A: Conversion of binary number to decimal:Step-1: Conversion of a binary number 1010011 to decimal

Q: 13.2 (Suffle ArrayList) Write the following method that suffle an ArrayList of the numbers: public s...

A: In shuffle method parameter ArrayList is passed where for loop is used to iterate over the ArrayList...

Q: for c++ for binary tree how would find the longest length?? findlongestlength ()?

A: The function “findlongestlength()” is given with the driver program in C++ is as follows,#include &l...

Q: Please see question attached.

A: Below is the explanation of the Logic gates used in the given circuit diagram: -NOT GATE: - The logi...

Q: Please answer as soon as posibble.

A: For the first question, the correct option would be (C), that is, O(log­2 n).Reason – If the variabl...

Q: Please help with the follow question in C++

A: A Queue is constructed as follows,/*Define the method that places an item into the Queueand returns ...

Q: Odd even Challange Python Coding Tell user to input a 3 digital number ONLY Use a WHILE LOOP to ask ...

A: Following is the python program that takes as input from user a number and makes sure a number is a ...

Q: Hi, I am programming in java. The instructions require: Create a new project and call it Project8. C...

A: Program Instructions:Create a 2D array of 10*10 and populate it with random numbers ranging from 1 t...

Q: What are the tasks of system maintenance?

A: Answer:System maintenance tasks:Deleting from the builds list – the Cluster Manager build history is...

Q: Please help with the follow question in C++

A: Program Instructions:Create a function insertOnTheTop() that makes a new node and assign that node t...

Q: Write a program with total change amount as an integer input that outputs the change using the fewes...

A: Completing the given C++ program so, that it can follow the given rubrics:Firstly, displaying a mess...