You have been hired to write software for a house painting
company.
Your primary goal
is to make up estimates for prospective customers. Estimates
include both material (paint)
and labor. These each depend on how big the house is.
(Paint
prices also vary.)
Houses are assumed to have a living room and at most 5 bedrooms.
Each room is assumed
to be rectangular with a specified width and length. (All walls
are 9 feet high.)
Paint comes in two grades: standard ($5/gallon) and deluxe
($10/gallon).
A gallon of paint
will cover 1000 square feet of wall. The painters earn $20 / hour and
paint 500 sq. feet / hour.
(Any resemblance between these figures and the real world is purely
coincidental.)
Suppose we have a home such as the following:

The total wall surface is 2*9*((20+15) + (40+20) + (35+20) + (30+20))=
3600 sq. feet.
That will take 4 gallons of paint (with some left over) costing either
$20 or $40 depending on quality.
The labor cost will be 3600 / 500 * $20 = $144. The total cost
(assuming deluxe paint) is $184.
Starting from the template available here,
complete the program by creating 3 classes:
House, Paint, Estimate. Further indications about the data and
functions of each class
appear in the template.
Once your classes are defined, complete the main function. You
will create several objects and
then make them work by calling their member functions. Details
are in the template.
Your output will look something like this:
Living Room: 20 x 15
Bedroom 1: 40 x 20
Bedroom 2: 35 x 20
Bedroom 3: 30 x 20
We will paint your 3600 square foot home
using white (DELUXE) for $184.00.
Materials = $40.00
Labor = $144.00
Press any key to continue
In your class declarations, make all your data private and all your
functions public.
Only display functions should use cout. You will not use cin
at all. The details
used for the estimate will appear in the code of your main function
(i.e. hardwired).
The names of classes are capitalized and almost nothing else is!
Indent like there's
no tomorrow!!