Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer in c + + A painting company has determined that for every 1 1 0 square feet of wall space, one gallon of paint
Answer in c A painting company has determined that for every square feet of wall space,
one gallon of paint and eight hours of labor will be required. The company charges
$ per hour for labor. Write a modular program that allows the user to enter
the number of rooms that are to be painted and the price of the paint per gallon. It
should also ask for the square feet of wall space in each room. It should then display
the following data:
The number of gallons of paint required
The hours of labor required
The cost of the paint
The labor charges
The total cost of the paint job
Input validation: Do not accept a value less than for the number of rooms. Do not
accept a value less than $ for the price of paint. Do not accept a negative value
for square footage of wall space.
Instructions:
a Use the class PersonalData to store the homeowner's data, the type of data of the attributes are of type MyString.
b Define a class Room with attributes of the class RoomWall composed of two objects of the type FeetInches version Use this class to calculate the area to be painted. Do not take into account the windows.
c Define a dynamic array Do not implement Vectors where the information of each of the house's rooms is stored.
d Document your solution with a descriptive table, UML diagram, and CRC table.
e For validations use trycatch and define a class for each validation suggested by the problem.
f The classes PersonalData, FeetInches and MyString are those discussed during the course.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started