Program that will predict the size of a population

Assignment Help JAVA Programming
Reference no: EM131914335

Program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage, expressed as a fraction in decimal form: for example 0.052 would mean a 5.2% increase each day), and the number of days they will multiply. A loop should display the size of the population for each day.

Prompts, Output Labels and Messages.The three input data should be prompted for with the following prompts: "Enter the starting number organisms: ", "Enter the daily increase: ", and "Enter the number of days the organisms will multiply: " respectively. After the input has been read in successfully, a table is produced, for example:

-----------------------------

2 300.0

4 675.0

Under the heading is a line of 29 dashes followed by one line for each day, showing the day number and the population at the beginning of that day.

Input Validation.Do not accept a number less than 2 for the starting size of the population. If the user fails to satisfy this print a line with this message "Invalid. Must be at least 2. Re-enter: " and try to read the value. Similarly, do not accept a negative number for average daily population increase, using the message "Invalid. Enter a non-negative number: " and retrying. Finally, do not accept a number less than 1 for the number of days they will multiply and use the message "Invalid. Enter 1 or more: ".

Reference no: EM131914335

Questions Cloud

What is the total contribution margin at break-even point : What is the company's CM ratio? Without resorting to computations, what is the total contribution margin at the break-even point?
Calculate the price of common stock : Calculate the price of its common stock if dividends grow at an annual rate of 6.5% for the first three years, followed by 3.5% annual growth thereafter.
Appropriate probability models : Please answer the following questions using the appropriate probability models:
How many shares will green repurchase : What will the stock price be immediately after Green announces its plan to issue bonds and repurchase equity? How many shares will Green repurchase?
Program that will predict the size of a population : Program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average population
Discuss the limits on teen tanning : The American Academy of Dermatology Association (AADA) has urged the FDA to ban the sale and use of indoor tanning equipment for non-medical purposes.
What is the standard error of the average house : (a) What is the standard error of the average house price for a sample of 133 houses? (Use 4 decimals.)
Assume no taxes-no direct bankruptcy costs : Assume no taxes, no direct bankruptcy costs, all investors are risk neutral, and the risk-free interest rate is zero.
Write a two page precis : Read the part Charlotte Perkins Gilman: "Women and Economics" in the attachment and follow the instruction to write a two page double space Precis.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd