CS182 -- Lab 2: Port-a-Jons



->Courses
->CS182
-->Objectives
-->Homework
-->Quiz 1
-->Lab 1
->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
-->Lab 6
-->Project
->Electronic Submission
->Old Exams
->C++ Examples
->MSVC Info
->Software
->Tentative Schedule
->Support Forum
->Course Policies

[Courses]
[Rich][Home][Rich]
[Author]

Winter Quarter 2002-2003

I'd like to gather all the peoples of the world on a mountaintop to sing together in peace and harmony. But first I'd like to corner the world market on Port-A-Johns.
Bob Van Voris

Overview

In this lab, you should develop basic C++ program skills and familiarity with conditional statements.

Procedures

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.

Be sure to check my MS Visual C++ Info page for information on patches that may need to be applied to your MSVC software.

Lab report (due 11:00pm, the day prior to week 4 lab)

The lab report should be in your own words and self-contained. By self-contained I mean that it should be possible for someone to understand what you did and why without seeing anything other than your report. Your report should include:

  • Purpose (educational objectives)
  • Problem Statement (in your own words)
  • Procedure (an explanation for your method of determining the number of port-a-jons required, the steps you used to design your program, reasons for your design decisions, etc.)
  • Discussion (sample program output, problems you encountered (and how they were overcome), etc.)
  • An activity log indicating how much time you spent on each phase of the assignment. You should use the format found in the template XML file and report the time in the following categories:
    • Design
    • Coding
    • Debug (before you think it's working)
    • Test (after you think it's working)
    • Writing Report
    • Other
  • Conclusions (what you learned, suggestions of how the assignment could be improved, things you would have done differently, etc.)
  • Documented source code for your program.

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. It may be wise to keep a diskette backup as well.

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.

© 2002 Dr. Christopher C. Taylor Office: CC-27C Phone: 277-7339 Last Updated: Mon Jan 27 06:09:01 2003
I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to.