Question: C# Create a program to ask the user which color Popsicle they would like. Use a switch statement to process their input. Display an appropriate

C#

Create a program to ask the user which color Popsicle they would like. Use a switch statement to process their input. Display an appropriate message for the desired color.

Example Output

What color Popsicle do you want from the freezer?

1) Red

2) Green

3) Blue

13) Aquamabrown

> 1

Ah! Red cherry, good choice!

What color Popsicle do you want from the freezer?

1) Red

2) Green

3) Blue

13) Aquamabrown

> 13

Uh... I don't know how long that's been in there...

Create a Magic 8-Ball program. Ask the user to first think of a yes/no question and then press any key to continue. Once they press a key, generate a random number between 0-6 (inclusive), and use a switch statement to print out one of the following statements. Feel free to use an enum to make your program read easier.

Absolutely NOT!

No

I dont think so

Hmmm maybe?

I believe so

Yes

Hell YES!

Example Output

Think of a yes/no question.

Press any key to continue...

Absolutely NOT!

Create a program to simulate level difficulty. Each level of difficulty of your game will have a different number of enemies, though that number is random. Ask the user which level of difficulty they would like to play. Use a switch to process their choice. Generate a random number of enemies for your game, but generate a number in a higher range for harder levels of gameplay. The exact ranges are up to you.

Write a program to roll a random character. Declare an enum with all the different character types in your game. Then generate a random number between the min and max values of your enum (e.g. if you have 4 character classes, then enum values are 0, 1, 2, 3). Finally, depending on the character class that was randomly selected, generate some character stats, either randomly or hardcoded.

Example Output

Press enter to roll a random character...

Type: Warrior

HP: 93

MP: 1

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 Databases Questions!