Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program called Desk. You are going to create a program will calculate the cost of how much it would cost to make a

Create a program called Desk. You are going to create a program will calculate the cost of how much it would cost to make a desk based on some questions. In the main(): will call a print function. input function: have it accept input for the number of drawers are in the desk, they type of wood (mahogany, oak or pine) return the values to cost cost function: call the input function then calls the wood function and drawer function. return the cost to Calculate the total cost of the desk and return the answer to print wood function Pine desk are $200 Oak desk are $240 all other woods are $280 drawer function The customer gets 3 drawers at no additional cost $30 charge for each additional drawer. print function: will call the cost function and then display the wood type chosen and cost, the number of drawers and cost and the total cost. remember to use the currency method main(): call printOutput(): userInput(): ask user for type of wood and number of drawers returns to the cost() (hint: leave the parameters blank and return the drawer and wood type) wood() Determine the wood price drawer() Determine the drawer price cost(): calls the Userinput() (hint: intDrawers, strWoodType = userInput() ) calls the wood() calls the drawer() Calculates the answer returns to the print print(): printOutput() calls the cost() Displays answer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Development Of Knowledge Framework For Affective Content Analysis

Authors: Swarnangini Sinha

1st Edition

B0CQJ13WZ1, 979-8223977490

More Books

Students also viewed these Databases questions