Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with this C++ programming warm-up question. Please and thank you. a warm-up exercise to designing programs using the top-down approach you are to

Need help with this C++ programming warm-up question. Please and thank you.

image text in transcribed

image text in transcribedimage text in transcribed

a warm-up exercise to designing programs using the top-down approach you are to write a C++ program to estimate the some of the materials required to renovate a rectangular room with a flat ceiling that is parallel the floor. The program asks for the room's length, width, height, the number of doorway ppenings and the number of windows, then computes the materials needed according to the tormulas: - Litres of paint = wall space (m2) divided by 6.5L/m2 then subtract 1L for every 4 windows or doors. (Note: If there is one door and two windows then do not subtract any litres but if there are three doors and three windows then subtract 1L.) - Boxes of flooring = floor space (m2) plus 0.05m2 per doorway divided by 1.8m2/ box. Adjust the number of boxes by adding an extra 1 box for every 10 boxes, round up. (Note: If the number of boxes required is 1 to 10 then the adjustment would add 1 box but if the number of boxes required is 21 to 30 then add 3 boxes.) - Trim in linear meters = the circumference of the room, plus 4 meters per door, plus 5 meters per window then add a cm for every three corners in the trim (round down) to account for the additional kerf. The trim includes the base board and the casing around each doorway and window. The room has four corners, each doorway has four corners and each window has four corners. 2 Specification 1. Write function(s) for each calculation as described above. 2. Write a function to instruct the user what the program does and how to use the program. 3. Use appropriately named constants in your implementation. Variable names that you choose should reflect their intended use. 4. Provide appropriate pre-/post-condition(s) for each function as discussed in lectures. 5. Your program should allow the user to repeat this calculation as often as the user wishes 6. Test each function for correctness using the boundary values, with correct and incorrect inputs. 1. Write the prototype declaration of each function in a file named 2. Write the implementation code for each function in a file named 3. Write the main program code in a file named

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions