Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program must be written in C#. Programming Exercise 3 (pg. 349) Create a program for The Cactus Cantna named FoodOrder that accepts a user's choice

image text in transcribed

Program must be written in C#.

Programming Exercise 3 (pg. 349) Create a program for The Cactus Cantna named FoodOrder that accepts a user's choice from the options shown in the accompanying table. Allow the user to enter either an integer tem mmber or a string description Pass the user's entry to one of two overbaded GetDetails) methods, and then display a retuned string with all the order details. The method version that accepts an integer looks up the description and price; the version that accepts a string description looks up the item number and price. The methods retum an appropriate message if the item is not found. Item Number Descriptioin Price 23 25 31 Burrito Taco Tostada 1.95 2.25 3.10 Hint 1. Store Item Number, Description and Price in parallel arrays. 2. Find below the headers of the two GetDetails overloaded methods. private static string GetDetails(int item, int[] itemNums, string[] descriptions, double[] prices) private static string GetDetails(string desc, int] itemNums, stringl] descriptions, double[] prices) Sample Outputs: Please enter item number or description >> 25 Item #25 Taco $2.25 Press any key to contiue Please enter item number or description 34 Item#34 was not found Press any key to continue Submit FoodOrder.cs file. Make sure to copy paste your output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ how might this lead to faster growth in productivity?

Answered: 1 week ago