CPSC 120A -- Assignment #1

Food Distribution
Due Friday, September 24, 2010 by 4 p.m.

Write a Java program to help a food bank distribution center plan distribution of boxes of donated food to the 15 local food pantries it serves. When large quantities of food are donated to the food bank the distribution center uses its delivery truck, which is is 22.5 feet long, 7.75 feet wide, and 8.25 feet high, to deliver the food to the local food pantries. Your program will help by computing quantities such as the number of boxes that will fit in the truck, the number of local food pantries that can be served with one truck load, and an estimate of the time it will take to load the truck. A detailed list of quantities to be computed, along with assumptions about how the quantities are computed, is below.

Input to the program will be:

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):

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

Sample Output (NOTE: This shows the prompts and input of 24 20 14 for the dimensions (length, width, height) of the box; 2000 for the number of boxes donated.

Food Bank Distribution
======================
 
Enter size of each box donated ---
   length, width, height (in inches): 24 20 14
Enter the number of boxes donated: 2000

 
Distribution Planning Information
*********************************
 
Box size (in inches): 24.0 by 20.0 by 14.0
Number of boxes donated: 2000
Number of boxes that will fit in the truck: 308
Number of boxes each local food pantry should receive: 133 
Number of leftover boxes: 5
Number of food pantries served by one truck load: 2
Number of truck loads needed: 8
Number of boxes in a "full" load: 266
Number of cubic feet of unused space in a "full" truck: 404.149
Estimated time to load a full truck: 2 hours, 35 minutes 
 

Requirements:

Warning: A program that does not compile will receive at most 20% on the assignment even if the error is a small one preventing compilation.

Submission

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.