Assignment #1

Due: Friday, May 28



Create a program (Filename: paint.cpp) that will calculate the amount of paint needed to cover one side of a house with a sloped roof.

General Requirements

A sample run: (user input underlined)

Welcome to Paint Calculator 2010!!

How wide is the wall (in feet)? 40
and how high is the wall to the bottom of the roof? 15.7
and how high is the wall to the top of the roof? 21.5
How wide is the window (in feet)? 3
and what is the window's height? 2.75

A side wall that is
   40' wide and
   15.7' tall to the roof bottom and
   21.5' tall to the roof top,
containing a window that is
   3' wide and
   2.75' tall,
has 735.8 square feet of paintable wall
and would require 1.84 cans of paint
(assuming that each can will cover 400 square feet of wall).

Thanks for using Paint Calculator 2010. Goodbye!!

Compiling and Running:

This code only uses a standard library (iostream), so it will compile with any C++ compiler. Make sure you practice with MS Visual C++ 2008 Express Edition (and make sure it reports no compile errors!) before you submit the program.

Be sure to follow the instruction file on the course web page, on building console projects in Visual C++


Program submissions should be done through the submission web page, linked from the main course web site. You will need your submission password -- these were handed out in the first recitation class (May 17 - 21). If you missed class, see me or the TA who teaches your recitation section ASAP (or e-mail, if you can't come see me) to obtain your password. Do not send program submissions through e-mail -- e-mail attachments will not be accepted as valid submissions.

General Advice - always keep an untouched copy of your finished homework files on your computer science account. These files will have a time-stamp which will show when they were last worked on (a timestamp from the CS servers) and will serve as a backup in case you ever have legitimate problems with submitting files through the web site. Do this for ALL programs.