Question: C# coding Please follow the instructions below USING ARRAYS In previous chapters, you created applications for the Greenville Idol competition. Now, modify your version of

C# coding

Please follow the instructions below USING ARRAYS

In previous chapters, you created applications for the Greenville Idol competition.

Now, modify your version of the GreenvilleRevenue program created in Chapter 5 so that after the user enters the number of contestants in this years competition, the user is prompted for the appropriate number of contestant names and a code for each contestant that indicates the type of talent:

  • S for singing
  • D for dancing
  • M for playing a musical instrument
  • O for other.

Make sure that all entered codes are valid, and if not, re-prompt the user to enter a correct code. For example, if Y is input, output Y is not a valid code, and re-prompt the user until a valid code is entered.

After contestant data entry is complete, display a count of each type of talent. For example, if there were ten singers, four dancers, seven people who play musical instruments, and one in the other category, the output should be:

The types of talent are: Singing 10 Dancing 4 Musical instrument 7 Other 1

Then, continuously prompt the user for a talent code until the user enters a sentinel value (the uppercase character Z should be used as the sentinel value).

With each code entry, display a list of the contestants with that code, or display a message that the code is not valid and re-prompt the user. For example, if M is entered, the output might be:

Contestants with talent Musical instrument are: Michelle Nick

If U is entered, the output should be U is not a valid code.

In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLine("This is an example: {0}", value.ToString("C", CultureInfo.GetCultureInfo("en-US")));

These input need to work and have these outputs, please.

Input

1 5 Paul D Michelle M George S Katie O Nick M M M D S O Z

Expected Output

The types of talent are:

Singing 1

Dancing 1

Musical instrument 2

Other 1

Contestants with talent Musical instrument are:

Michelle

Nick

Contestants with talent Dancing are:

Paul

Contestants with talent Singing are:

George

Contestants with talent Other are:

Katie

Input

1 1 Sarah i M Z

Expected Output

i is not a valid code

Input

1 1 Mike S L Z

Expected Output

L is not a valid code

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!