In this lab, you should develop basic Java programming skills and familiarity with conditional statements.
Write a program that calculates the number of port-a-jons necessary for an event where no other relief facilities are available. The user should be asked to enter the number of people attending the event, the length of the event, and an estimate for the number of beverages consumed during the event.
You should develop a reasonable method for calculating the number of port-a-jons necessary. Your method should take into consideration all of the data entered by the user.
How many port-a-jons should be available for the event described by Bob Van Voris at the top of this page? You may assume that the event will last four hours and that the average person will consume three beverages.
If a user enters a negative value the program should provide and error message and exit without estimating the number of port-a-jons required. Your program does not need to perform error checking for invalid user input other than negative numbers.
Each student should submit a lab report. The report should be self-contained and in your own words. That is, it should be possible for someone to understand what you did and why without seeing anything other than your report. Your report should include:
As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost.
Your grade will depend on quality of design, clarity of code and documentation, as well as whether your program produces the correct results. If you have any questions, consult your instructor.
| © 2001-2006 Dr. Christopher C. Taylor | Office: CC-36C | Phone: 277-7339 |