Lab Goal: practice problem-solving and coding

A hurricane just passed through your area. You decided to evacuate. You tried to bring enough food and water for 15 days but are not sure if you bought enough. You purchased only bread, peanut butter, jelly, and water. On the way, you stopped at a friend’s house to see if they wanted to go. Every day a typical human will eat 8 pieces of bread, ¼ jar of jelly, ½ jar of peanut butter (they are smaller) and drink 1 ¼ gallons of water. How much should you have purchased for your time away from home with minimal waste? Write a program that calculates the quantities and lets the user know how much food they should purchase.

Requirements

  1. Write your algorithm in the comments at the top of the program
  2. Numbers are not (in general) allowed in any calculations. You must use variable names
  3. Have a print statement that includes pertinent information.
  4. Sample statement: I see two people are going. You will need 287 pieces of bread, 55 gallons of water.
  5. Use debugging techniques as/if you experience errors.
  6. When complete, submit by email the .java file  and a cropped screen shot of your results.

Devote any extra time to completing Project One. Be sure to abide by the instructions as provided.