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, 23.06.2019 00:00
How do we use the sumif formula (when dealing with different formats) ?
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 22:00
What is a number system, and what is the total number of digits used in this system called? a number system is a system that uses different (options: a) numbers b) symbols c) codes d) digits e) alphabets) to represent different numbers. the total number of digits used in a number system is known as its (options: 1) processor 2) converter 3) radix 4) least significant digit 5) most significant digit)
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, 06.10.2020 14:01
question
Spanish, 06.10.2020 14:01
question
Mathematics, 06.10.2020 14:01
question
Health, 06.10.2020 14:01
question
Mathematics, 06.10.2020 14:01
question
Mathematics, 06.10.2020 14:01
question
Mathematics, 06.10.2020 14:01
question
Mathematics, 06.10.2020 14:01