Write C++ program that calculates the cost of building a desk. The main()function calls
four other functions. Pass all variables so that the functions make copies of any variables
they receive:
» A function to accept as input from the keyboard the number of drawers in the desk.
This function returns the number of drawers to the main program.
» A function to accept as input the type of wood—‘m’ for mahogany, ‘o’ for oak, or ‘p’ for
pine.
» A function that receives the drawer number and wood type, and calculates the cost of
the desk based on the following:
Pine desks are $100.
Oak desks are $140.
All other woods are $180.
A $30 surcharge is added for each drawer.
This function returns the cost to the main()function.
» A function to display the final price.
1
Expert's answer
2014-03-17T13:54:40-0400
Dear customer, Unfortunately, your question requires a lot of work and cannot be done for free. Please submit it with all requirements as an assignment to our control panel and we'll assist you.
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment