Question
The local taqueria now wants some help with their kitchen system. There are the same four types of burritos as question 1: carnitas, beef, shrimp,
The local taqueria now wants some help with their kitchen system. There are the same four types of burritos as question 1: carnitas, beef, shrimp, and vegetarian. They would like you to create a program to send an alert to the kitchen if there is a shrimp burrito in a given order.
Your main() function should prompt the user for the number of burritos in the order, and then enter all the burrito types for the order. The burrito types should be stored in an array of strings. You'll also need to store the number of burritos in the order. You can assume that no order will have more than 10 burritos. You can assume that the user only types in valid types of burritos, e.g. carnitas, beef, shrimp, vegetarian.
The shrimp burrito must be cooked to order and thus takes longer to prepare than the other kinds. Because of this, an alert is needed ASAP if there is a shrimp burrito in the order. Write a function which takes two parameters: your array of burrito strings, and the number of burritos in the array. It should determine if there are any shrimp burritos in the array and print out an alert if so. You must write a function for this alert, this can't be in main().
Hint: you don't need to use a 2D array to do this! A single array of type string is best.
Two sample outputs are shown below, one with a shrimp in the order, one with no shrimp in the order. User input in bold red:
How many burritos are in the order? 3 What is burrito 1: beef What is burrito 2: beef What is burrito 3: shrimp There is a shrimp in the order! How many burritos are in the order? 2 What is burrito 1: chicken What is burrito 2: veggie There is no shrimp in the order.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started