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, 20.06.2019 18:04
Plz i know like nothing on powerpoint and word question 30(multiple choice worth 2 points) (07.01 lc) when using the powerpoint online application, to add or delete a slide in a presentation, go to the tab. design file home insert question 31(multiple choice worth 2 points) (08.03 mc) sandy has an entry-level position in a graphic design company. she wants to learn more about the company and the skills she should obtain in order to advance. what is one way to do this? email her boss weekly with questions about the company find a more experienced co-worker and build a mentor-mentee relationship read articles and watch videos related to graphic design write down her questions and submit them on a design blog question 32(multiple choice worth 2 points) (05.05 mc) tasha purchased a new tablet. she has several questions about how to connect to the internet, download apps, install software, and sync her other devices. which type of resource would be best, and why? bulletin board; shows other user's comments faq; answers questions about common issues manual; provides all information related to the device tutorial; explains each stage of the process question 33(multiple choice worth 2 points) (06.02 mc) which part of color theory deals with how colors on a web page relate to each other? complementation contrast matching vibrancy question 34(multiple choice worth 2 points) (07.02 lc) when using the powerpoint online application, which tab allows users to add graphical and multimedia elements to a presentation? design file home insert question 35 (true/false worth 2 points) (07.04 lc) in the powerpoint online application, timing allows you to reorder an animated object in two ways: move earlier and move later. true false
Answers: 2
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
You know the right answer?
1. Write a function called OrderTotal that takes in four integer parameters representing the number...
Questions
question
Biology, 14.02.2020 02:24
question
Social Studies, 14.02.2020 02:24
Questions on the website: 13722360