Answered step by step
Verified Expert Solution
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 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 people
A medium cargo plane can replace small cargo planes
A large cargo plane can replace medium cargo planes
An industrial cargo plane can replace 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 and 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 people and 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 people, you would only display industrial cargo planes and medium cargo plane remember that all supplies need to be delivered, so keep rounding in mind Please use Listing on page 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
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