CPSC 120 -- Assignment #1

Humanitarian Aid Shipment
Due Friday, September 23, 2011 by 4 p.m.

Write a Java program to help a humanitarian aid organization plan a shipment of food to a country devastated by some natural disaster. The organization wants to send one shipping container of a single commodity (such as wheat, maize, or dried milk). The interior of the shipping container is 39.1 feet long by 7.5 feet wide by 7.7 feet high. The commodity will be packaged in cylindrical drums which are different sizes depending on what is being shipped. The shipping company the organization plans to use charges $15.75 per drum plus $3.50 per cubic foot for a filler material that is required to fill all empty space in the container around the drums. The maximum total weight of the commodity to be shipped (not counting the weight of the drums or the weight of the filler) is 59,000 pounds.

The program should compute the number of drums that the organization can ship (as described below) and the total cost of shipping the container.

Input to the program will be:

Output Your output must be nicely formatted and must include the following information (all appropriately labeled):

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

Sample Output (NOTE: This shows the prompts and input of 24 (inches) for the diameter of the drum, 34.5 (inches) for the height of the drum, and 60 for the weight per cubic foot of the commodity)

Analysis of Shipment of Humanitarian Supplies
=============================================
 
Enter size of each drum to be shipped ---
   diameter (in inches):  24 
   height (in inches): 34.5
Enter the weight (in pounds) per cubic foot of the commodity: 60

 
Shipment Summary
****************
 
Number of Drums That will Fit in the Container: 114
Maximum Number of Drums that can be shipped due to weight: 108
Number of Drums to Be Shipped:  108
Total Weight of the Shipment (in pounds): 58527.87...
Total Cubic Feet of Commodity Shipped:  975.4545...
Cubic Feet of Extra Space: 1282.560
Shipment Cost: $ 6189.96168...
 
NOTE: If you use the same size drum but a weight of 45 pounds per cubic foot you get 114 drums to be shipped and a cost of $6094.788...

Requirements:

Submit to Inquire: A zip file containing your program.

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.