Question: Can you please be detailed with code and how to run it . If code can output example I attached. Thank you Example Program The

Can you please be detailed with code and how to run it. If code can output example I attached. Thank you
Example Program
The example program simulates ordering at a Drive-Thru Restaurant. The program will ask for the users
menu choices, then display the total cost of his order.
The TheCafe.cs program illustrates the skills you are learning in this lab. Download the program, create a
project for it in Visual C#, and take the time to read and understand the code. Once you understand
what is happening in the code, then proceed to the next section.
Your Program
Your program for this lab simulates a Magic 8-Ball. The Magic 8-Ball is a fortune telling toy in which the
player asks any Yes/No question and the Magic 8-Ball randomly answers the question with one of 20
possible answers. A description of the game, along with the twenty answers can be found on
the Wikipedia page.
For this program, you only need to use the following 5 answers:
It is certain
Reply hazy, Try Again
Dont count on it
Signs point to yes
My sources say no
To complete this program, you will need to generate a random number. Because we have not looked at
this before, I have provided you with the code below to achieve this. This code will generate a random
number between 1 and 5(the values needed for this program), and store it in the integer variable roll.
Feel free to play around with these values to better understand this functionality.
Random rnd = new Random();
int roll = rnd.Next(1,5);
Your output should look similar to the sample given below. Turn in your completed program, with the
usual file naming convention.
CHALLENGE
For this weeks challenge component, rewrite the program using a switch statement instead of a series
of if...else if statements. Submit this challenge component as a second file (so that I can see your use of
both if...else if as well as switch.
Can you please be detailed with code and how to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!