Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Project 2 - Disaster Relief Planes Note: When you turn in an assignment to be graded in this class, you are making the claim

Programming Project 2- Disaster Relief Planes
Note: When you turn in an assignment to be graded in this class, you are making the claim that you neither gave nor received assistance on the work you turned in (except, of course, assistance from the instructor or teaching assistants).
Virtuous Crisis Undertakings (VCU) is a disaster relief organization that collects and distributes supplies to areas affected by disaster. In their current effort, they are trying to distribute supplies via aircraft to a location. Write a program called DisasterRelief.java that will help VCU figure out how many cargo planes and what kinds of cargo planes they need to distribute their supplies.
A small cargo plane can carry supplies for 5000 people
A medium cargo plane can replace 3 small cargo planes
A large cargo plane can replace 5 medium cargo planes
An industrial cargo plane can replace 9 large cargo planes
The program will first ask the user if they would like to randomly generate a population amount or enter it. If the user picks the randomly generated population amount, the program will use Math.random() to randomly generate a population amount between 5,000 and 8,000,000 inclusively and will display the number generated to the user. If the user wants to enter the number, then the program will ask the user for a population amount between 5,000 people and 8,000,000 people.
The program will then calculate the appropriate number of each cargo plane. It will only display the number of cargo planes needed. For example, if you needed to distribute supplies for a population of 1,364,000 people, you would only display 2 industrial cargo planes and 1 medium cargo plane (remember that all supplies need to be delivered, so keep rounding in mind). Please use Listing 2.10 on page 63 of the PDF version of our textbook as your guide.
The program should be able to handle incorrect numeric inputs by the user. If the user does not enter a number that is expected the program will state, Incorrect input.

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

Determine the missing amounts these three independent situations

Answered: 1 week ago