CS177, C++ Programming
Spring 1996

Paint estimator

Williamson's Paint and Papering store wants a computer program to help them determine how much paint is needed to paint a room. Assuming a room is to have four walls and the celing is to be painted, input for the program should be the length, width of the room. Use a constant for the wall height (eight feet). One gallon of paint covers 250 square feet. Cost of paint for the walls and ceiling shold be entered by the user. Output should be the amount and cost of each kind of paint and the total cost.

Procedure

  1. Design the program using the object design technique discussed in class, and draw the design in an appropriate diagram that makes your choices of classes clear, as well as the representation of the data members.
  2. Design the class methods (function members) in a top-down fashion, and draw the top-down calling diagram (which method calls what).
  3. Write the program code in accordance with your design. Refer to the handout "Guidelines for submitting a programming assignment" for details on layout, commenting etc.
  4. Hand simulate it with these values: length: 25'9", width: 14'7", cost per gallon: $12.95. Draw the hand simulation table without doing one row per changed value.
  5. Enter and compile the code. Remove compiler errors.
  6. Run the program using any values you see fit to fully test it.
  7. Run the program on the values given in step 4, redirect the output to a file, insert the output file at the end of the source code file and print both together.
  8. Hand in your object design, method breakdown, hand simulation and program code plus output.
  9. Mail the program code only to the grader, login hdp.

Grading

Object design: 25%

Top-down method design 25%

Hand simulation: 15%

Source code:and output: 35%

Due date

Hand in your four documents in class on Wednesday, March 13th.