The Carpet Estimator

Here is your first writing assignment.

Write a C++ program that calculates the cost of carpeting a room. The program should read in the length and width of the room, in feet, the carpet cost in price per square yard, and the number of hours required to lay it. Fixed costs are the carpet pad, at $1.50 per square yard, and labor costs at $7.50 per hour. The program should print the size of the room, the carpet cost, the number of hours taken, and the total cost of laying the carpet.

Your solution must include the following:

  1. A problem statement
  2. A problem description
  3. An object design developed from the problem description
  4. A process design developed from the problem description
  5. A source code listing that matches the design in 3 and 4, contains at least three classes, has appropriate comments, well-chosen names and uses no global variables or functions.
  6. A printout of the program running with these values: length = 16.7 ft., width = 14.2 ft., carpet cost = $11.89 per sq. yd., laying time = 2.6 hrs.

Use the Paint Estimator handout to motivate your solution.

Hand in your six items above, as a packet, by 5 pm. on February 28th.

Pay attention to the design issues discussed in class, and keep your code simple and clean. Good luck!