TCC Krusty Krab Menu For Ordering In C PlusPlus Code

  • Write a function called OrderTotal that takes in four integer parameters representing:the number of krabby pattiesthe number of drinksthe number of friesthe number of pizzasin 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 quantity of each item and return this total as a double.
  • 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.502. Barnicle Fries …. $1.503. Kelp Shake …….. $1.004. Krusty Krab Pizza . $5.00

    Save Time On Research and Writing
    Hire a Pro to Write You a 100% Plagiarism-Free Paper.
    Get My Paper
  • 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.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).
  • Important Note in this requirement

    As this exercise involves the use of functions, these tasks must be performed with the functions specified (not just with a single main() routine). This means your main() will end up calling these functions in the appropriate places.

    Sample Runs

    (user input is underlined, to distinguish it from output)

    Sample Run 1:

    Welcome to the Krusty Krab!———– Menu ———–1. Krabby Patty …… $3.502. Barnicle Fries …. $1.503. Kelp Shake …….. $1.004. Krusty Krab Pizza . $5.00What would you like? (Enter 0 to finish order!): 2How many: 1———– Menu ———–1. Krabby Patty …… $3.502. Barnicle Fries …. $1.503. Kelp Shake …….. $1.004. Krusty Krab Pizza . $5.00What would you like? (Enter 0 to finish order!): 4How many: 1———– Menu ———–1. Krabby Patty …… $3.502. Barnicle Fries …. $1.503. Kelp Shake …….. $1.004. Krusty Krab Pizza . $5.00What would you like? (Enter 0 to finish order!): 0Your order:1 barnacle fries.1 krusty krab pizzas.Your total is $6.50Enjoy the food!

    Save Time On Research and Writing
    Hire a Pro to Write You a 100% Plagiarism-Free Paper.
    Get My Paper
    Still stressed from student homework?
    Get quality assistance from academic writers!

    Order your essay today and save 25% with the discount code LAVENDER