subject

1. Write a function called OrderTotal that takes in four integer parameters representing the number of Krabby Patties, the number of drinks, the number of fries, and the number of pizzas in a customer's order. The function should return the total order cost based on the price of each item presented in the menu. NO user input or output to the screen should occur in this function. The function should simply calculate the order total based on the counts of each item and return this value as a double.
2. Write a function called menu that takes in no parameters and returns no value. This function is only responsible for printing the following menu to the screen:
Menu
1. Krabby Patty $3.50
2. Barnicle Fries $1.50
3. Kelp Shake $1.00
4. Krusty Krab Pizza . $5.00
3. To test these functions, and help facilitate your program, write a main() routine (in the same file) that enters a loop and starts by presenting the customer with the menu (by calling the appropriate function). Allow the customer to specify what they want off the menu. The customer should enter 1,2,3, or 4 to order an item or 0 to exit. If they enter any other value here (besides 0-->4) print an error message. If they enter a valid menu item, ask how many of that item they'd like to order. FORCE the user to enter a correct valid value here (0 or more is valid, negative amounts of items are not). See the sample runs below for more details.
4. When the customer is done ordering, print the counts of each item they ordered as well as their order total (by calling the appropriate function to help you calculate the order cost).
Sample Run 1:

(user input in [ ] )

Welcome to the Krusty Krab!

Menu
1. Krabby Patty $3.50
2. Barnicle Fries $1.50
3. Kelp Shake $1.00
4. Krusty Krab Pizza . $5.00

What would you like? (Enter 0 to finish order!): [2]
How many: [1]

Menu
1. Krabby Patty $3.50
2. Barnicle Fries $1.50
3. Kelp Shake $1.00
4. Krusty Krab Pizza . $5.00

What would you like? (Enter 0 to finish order!): [4]
How many: [1]

Menu
1. Krabby Patty $3.50
2. Barnicle Fries $1.50
3. Kelp Shake $1.00
4. Krusty Krab Pizza . $5.00

What would you like? (Enter 0 to finish order!): [0]

Your order:
1 barnacle fries.
1 krusty krab pizzas.

Your total is $6.50
Enjoy the food!

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
Linda subscribes to a cloud service. the service provider hosts the cloud infrastructure and delivers computing resources over the internet.what cloud model is linda using
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
You know the right answer?
1. Write a function called OrderTotal that takes in four integer parameters representing the number...
Questions
question
Mathematics, 02.10.2020 20:01
question
Mathematics, 02.10.2020 20:01
Questions on the website: 13722360