CPSC 120A -- Assignment #1

Humanitarian Aid Shipments
Due Friday, September 23, 2005 by 4 p.m.

The news of the last several weeks has made it clear that disaster planning and relief is both important and difficult. For this assignment you will write a Java program to help a relief organization plan the shipment of supplies to a disaster area.

The relief agency ships supplies to a disaster area in tractor trailers that measure 48 feet long, 98 inches wide, and 110 inches high on the interior. The agency needs a program that will help them compute the number of trucks needed to supply a certain number of people for a week. They also would like additional information calculated such as the time it would take the trucks to reach the disaster area and the amount of fuel it would take. These values of course depend on things such as what commodity they are shipping, how many people can be supplied by that commodity, and the distance to the disaster area. It is assumed that all items are shipped in rectangular boxes and all boxes in a given shipment are the same size.

The program should meet the following requirements:

Input to the program will be:

Values to compute:

Assumptions: Your calculations should be based on the following assumptions and requirements.

Output Your output must be nicely formatted (similar to that below but you should choose your own way of formatting) and must include the following information (all appropriately labeled with white space):

Sample Output (NOTE: This shows the prompts and input of 36 48 54 for the dimensions of the box; 6 for the number of people one box supplies for a week; 2500 for the number of people to feed and 1320 for the distance.

Analysis of Shipment of Humanitarian Supplies
=============================================
 
Enter size of each box to be shipped ---
   width, length, height (in inches): 36 48 54
Enter the number of people one box supplies for a week: 6
Enter the number of people who need aid: 2500
Enter the distance to the disaster site: 1320
 
Shipment Summary
****************
Box size (in inches): 36 by 48 by 54
Number of Boxes: 
Number of Trucks: 
Excess space in the truck that isn't full:   ___ cubic feet
Number of extra boxes that could be taken: 
Time to reach the disaster area:   ____ days and ____ hours
Number of gallons of diesel fuel needed:

Requirements:

Academic Integrity Reminder!!! Programming assignments are to be your own work. You may get help on the specifics of the assignment from no one except the instructor. You may not show your program to anyone or look at anyone else's program or share ideas with anyone about how to write the program.