Question: Please provide step by Step solution to Chapter 14 Program Challenge 13 Carpet Calculator Please ensure that step-by-step instructions come from starting out with C++

Please provide step by Step solution to Chapter 14 Program Challenge 13 Carpet Calculator Please ensure that step-by-step instructions come from starting out with C++ edition 8 up to Chapter 14.

The Westfield carpet company has asked you to write an application that calculates the price of carpet for rectangle rooms. To calculate the price, you multiply the area of the (floor times length) by the price per square foot of carpet. For example, the area of the floor that is 12 feet long and 10 feet wide is 120 square ft. To cover the floor with carpet that cost $8 dollars per square foot would cause $9.60. 12*10*8=960.

First you should create a class named RoomDimensions that has two feetInches objects as attributes: one for the length of the room and one for the width. You should use the version of the FeetInch you created and programming challenge 11 with the addition of a multiply member function. You can use this function to calculate the area of the room. The RomeDimension class should have a member function that returns the area of the room as a FeetInch object.

Next, you should create a RoomCarpet class that has a RoomDimensions object as an attribute. It should also have an attribute for the cost of the copper per square foot. The RoomCarpet class should have a member function that returns the total cost of the carpet.

Once you have written these classes, use them in an application that ask the user to enter the dimension of the room and the price per square foot of the desired carpeting. The application should display the total cost of the carpet.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!